home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Strate…Tools for the Enterprise / Microsoft Internet Strategy & Tools for the Enterprise.iso / bkoffice / inetsrv.nts / nt351qfe.usa / mpr / i386 / ntas / oemnsvra.inf < prev    next >
INI File  |  1995-10-07  |  266KB  |  5,962 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     RAS
  5. [GeneralConstants]
  6.     Chosen       = "ON"
  7.     NotChosen    = "OFF"
  8.     TRUE         = 1
  9.     FALSE        = 0
  10.     NoTitle      = 0
  11.     !DebugOutputControl = 0
  12.     FLibraryErrCtl = 1
  13.     OldVersionExisted = $(FALSE)
  14. [FileConstants]
  15.     HandleNull   = ""
  16.     RASDLGHANDLE = $(HandleNull)
  17.     PORTSDLGHANDLE = $(HandleNull)
  18.     RasServerOption = "Server"
  19.     RasClientOption = "Client"
  20.     RasAdminOption  = "Admin"
  21.     RasClientAndServerOption = "ClientAndServer"
  22.     Manufacturer    = "Microsoft"
  23.     ProductMajorVersion    = "4"
  24.     ProductMinorVersion    = "0"
  25.     ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  26.     NetEventDLL = "%SystemRoot%\System32\netevent.dll"
  27.     IoLogMsgDll = "%SystemRoot%\System32\drivers\IoLogMsg.dll"
  28.     RasMsgDll   = "%SystemRoot%\System32\rasmsg.dll"
  29.     EventTypeSupported = 31
  30.     HideComponent = 1
  31.     HideBindings  = 0
  32.     fReviewBindings = 1
  33.     ProductInfName     = "OEMNSVRA.INF"
  34.     ProductFullInfName = $(!STF_CWDDIR)$(ProductInfName)
  35.     RasDir      = $(!STF_CWDDIR)RAS
  36.     ProductPath = $(RasDir)"\"
  37.     ProductRASName        = "RAS"
  38.     ProductRASImagePath   = "%SystemRoot%\system32\ras"
  39.     ProductRASSvcType     = "system"
  40.     NetRuleRASClass       = "classRasService ""basic"""
  41.     NetRuleRASType        = "RasService classRasService"
  42.     NetRuleRASUse         = $(ProductRASSvcType)
  43.     !ProductPCIMACName     = "PCIMAC"
  44.     ProductRASSVRName       = "RemoteAccess"
  45.     ProductRASSVRImagePath  = "%SystemRoot%\system32\rassrv.exe"
  46.     ProductRASSVRSvcType    = "service"
  47.     NetRuleRASSVRClass      = "classRasServer ""basic"""
  48.     NetRuleRASSVRType       = "RasServer classRasServer"
  49.     NetRuleRASSVRUse        = $(ProductRASSVRSvcType)
  50.     NetRuleRASSVRBindForm   = """RasServer"" yes yes container"
  51.     NetRuleRASSVRBindable    = {"classRasServer netBiosTransport non non 100",+
  52.                                 "classRasServer ipxTransport non non 100"}
  53.     ProductRASMANName       = "RasMan"
  54.     ProductRASMANImagePath  = "%SystemRoot%\system32\rasman.exe"
  55.     ProductRASMANSvcType    = "service"
  56.     NetRuleRASMANClass      = "classRasManager ""basic"""
  57.     NetRuleRASMANType       = "RasManager classRasManager"
  58.     NetRuleRASMANUse        = $(ProductRASMANSvcType)
  59.     NetRuleRASMANBindForm   = """RasManager"" yes no container"
  60.     NetRuleRASMANBindable   = ""
  61.     !ProductRASARPName       = "RasArp"
  62.     !ProductRASARPImagePath  = "\SystemRoot\system32\drivers\rasarp.sys"
  63.     !ProductRASISNRIPName       = "NwlnkRip"
  64.     !ProductRASISNSAPName       = "NwSapAgent"
  65.     !ProductRASISNRIPImagePath  = "\SystemRoot\system32\drivers\nwlnkrip.sys"
  66.     !ProductRASISNSAPImagePath  = "%SystemRoot%\system32\services.exe"
  67.     !ProductNDISWANName        = "NdisWan"
  68.     !ProductNDISWANImagePath = "\SystemRoot\system32\drivers\ndiswan.sys"
  69.     ProductNDISWANSvcType   = "kernel"
  70.     ProductNDISWANType        = "transport"
  71.     !NetRuleNDISWANType        = "ndisWanDrv ndisWanTransport"
  72.     !NetRuleNDISWANClass     = {"ndisWanTransport basic"}
  73.     NetRuleNDISWANUse        = $(ProductNDISWANType)" yes yes"
  74.     !NetRuleNDISWANBindForm  = """NdisWan"" yes no container"
  75.     !NetRuleNDISWANBindable  = +
  76.           {"rasCapableTransport ndisWanAdapterDialIn non non 100",+
  77.            "rasCapableTransport ndisWanAdapterDialOut non non 100",+
  78.            "tcpipTransport ndisWanAdapterDialInIP non non 100",+
  79.            "tcpipTransport ndisWanAdapterDialOutIP non non 100",+
  80.            "netbtTransport ndisWanAdapterDialInIP non non 100",+
  81.            "netbtTransport ndisWanAdapterDialOutIP non non 100",+
  82.            "ipxTransport ndisWanAdapterDialInOutIPX non non 100",+
  83.            "bhService    ndisWanAdapterBH non non 100",+
  84.            "ndisWanTransport ndisWanAdapterBH non non 100",+
  85.            "ndisWanTransport ndisWanAdapterDialIn non non 100",+
  86.            "ndisWanTransport ndisWanAdapterDialOut non non 100",+
  87.            "ndisWanTransport ndisWanAdapterDialInIP non non 100",+
  88.            "ndisWanTransport ndisWanAdapterDialOutIP non non 100",+
  89.            "ndisWanTransport ndisWanAdapterDialInOutIPX non non 100"}
  90.     ProductRASASYMACName      = "AsyncMac"
  91.     ProductRASASYMACImagePath = "\SystemRoot\system32\drivers\asyncmac.sys"
  92.     ProductRASASYMACType      = "driver"
  93.     ProductRASASYMACSvcType   = "kernel"
  94.     NetRuleRASASYMACType      = "rasAsyMacDrv rasAsyMacDriver"
  95.     NetRuleRASASYMACClass      = {"rasAsyMacDriver basic"}
  96.     NetRuleRASASYMACUse      = $(ProductRASASYMACType)
  97.     NetRuleRASASYMACBindForm  = """RasAsyMac"" yes no container"
  98.     !NetRuleRASASYMACBindable  = +
  99.                        {"rasAsyMacDriver rasAsyMacAdapter non non 100"}
  100.     !ProductRASHUBDIALINName        = "RasHubDialin"
  101.     !ProductRASHUBDIALOUTName        = "RasHubDialout"
  102.     !ProductRASHUBDIALINIPName      = "RasHubDialinIp"
  103.     !ProductRASHUBDIALOUTIPName     = "RasHubDialoutIp"
  104.     !ProductRASHUBDIALINOUTIPXName  = "RasHubDialinoutIpx"
  105.     !ProductNDISWANDIALINName          = "NdisWanDialin"
  106.     !ProductNDISWANDIALOUTName          = "NdisWanDialout"
  107.     !ProductNDISWANDIALINIPName       = "NdisWanDialinIp"
  108.     !ProductNDISWANDIALOUTIPName      = "NdisWanDialoutIp"
  109.     !ProductNDISWANDIALINOUTIPXName   = "NdisWanDialinoutIpx"
  110.     !NetRuleHardwareBHType      = "ndisWanBH ndisWanAdapterBH"
  111.     !NetRuleHardwareBHClass     = {"ndisWanAdapterBH basic"}
  112.     !NetRuleHardwareBHBindForm  = " yes yes container"
  113.     !NetRuleHardwareNDISWANBindForm = " yes yes container"
  114.     !NetRuleHardwareDIALINType      = "ndiswandialin ndisWanAdapterDialIn"
  115.     !NetRuleHardwareDIALINClass      = {"ndisWanAdapterDialIn basic"}
  116.     !NetRuleHardwareDIALINBlock    = {"lanmanServer ndisWanAdapterDialIn",+
  117.                      "tcpipTransport ndisWanAdapterDialIn",+
  118.                      "netbtTransport ndisWanAdapterDialIn",+
  119.                      "ipxTransport ndisWanAdapterDialin",+
  120.                      "lanmanWorkstation ndisWanAdapterDialIn"}
  121.     !NetRuleHardwareDIALINIPType     = "ndiswandialinIP ndisWanAdapterDialInIP"
  122.     !NetRuleHardwareDIALINIPClass    = {"ndisWanAdapterDialInIP basic"}
  123.     !NetRuleHardwareDIALINIPBlock    = {"lanmanServer ndisWanAdapterDialInIP",+
  124.                       "nbfTransport ndisWanAdapterDialinIP",+
  125.                       "ipxTransport ndisWanAdapterDialinIP",+
  126.                       "lanmanWorkstation ndisWanAdapterDialInIP"}
  127.     !NetRuleHardwareDIALOUTType       = "ndiswandialout ndisWanAdapterDialOut"
  128.     !NetRuleHardwareDIALOUTClass    = {"ndisWanAdapterDialOut basic"}
  129.     !NetRuleHardwareDIALOUTBlock    = {"ipxTransport ndisWanAdapterDialOut"}
  130.     !NetRuleHardwareDIALOUTIPType     = "ndiswandialoutIP ndisWanAdapterDialOutIP"
  131.     !NetRuleHardwareDIALOUTIPClass    = {"ndisWanAdapterDialOutIP basic"}
  132.     !NetRuleHardwareDIALOUTIPBlock    = {"ipxTransport ndisWanAdapterDialOutIP",+
  133.                     "nbfTransport ndisWanAdapterDialOutIP"}
  134.     !NetRuleHardwareDIALINOUTIPXType = "ndiswandialinoutIPX ndisWanAdapterDialInOutIPX"
  135.     !NetRuleHardwareDIALINOUTIPXClass = {"ndisWanAdapterDialInOutIPX basic"}
  136.     !NetRuleHardwareDIALINOUTIPXBlock = {"nbfTransport ndisWanAdapterDialInOutIPX",+
  137.                     "tcpipTransport ndisWanAdapterDialInOutIPX",+
  138.                     "netbtTransport ndisWanAdapterDialInOutIPX"}
  139.     NetRuleHardwareRASASYMACType     = "rasAsyMac rasAsyMacAdapter"
  140.     NetRuleHardwareRASASYMACBindForm = " yes yes container"
  141.     NetRuleHardwareRASASYMACClass     = {"rasAsyMacAdapter basic"}
  142.     !ProductNDISTAPIName        = "NdisTapi"
  143.     !ProductNDISTAPIImagePath   = "\SystemRoot\system32\drivers\ndistapi.sys"
  144.     !RasPerfKeyName             = "Performance"
  145.     !RasPerfLibraryName         = "rasctrs.dll"
  146.     !RasPerfOpenFunction        = "OpenRasPerformanceData"
  147.     !RasPerfCloseFunction       = "CloseRasPerformanceData"
  148.     !RasPerfCollectFunction     = "CollectRasPerformanceData"
  149.     !RasCounterFileName         = "rasctrs.ini"
  150.     ProductKeyBase  = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  151.     ProductKeyName          = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASName)"\CurrentVersion"
  152.     !NetworkCardKeyName      = $(!NTN_SoftwareBase)"\Microsoft\Windows NT\CurrentVersion\NetworkCards"
  153.     RasSvrKeyName           = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)
  154.     RasSvrParamKeyName      = $(!NTN_ServiceBase)"\"$(ProductRASSVRName)"\Parameters"
  155.     !RasArpKeyName           = $(!NTN_ServiceBase)"\"$(!ProductRASARPName)
  156.     !RasIsnRipKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNRIPName)
  157.     !RasIsnSapKeyName        = $(!NTN_ServiceBase)"\"$(!ProductRASISNSAPName)
  158.     !NdisTapiKeyName         = $(!NTN_ServiceBase)"\"$(!ProductNDISTAPIName)
  159.     !RasManKeyName           = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASMANName)"\CurrentVersion"
  160.     RasManParamKeyName      = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Parameters"
  161.     RasManLinkageKeyName    = $(!NTN_ServiceBase)"\"$(ProductRASMANName)"\Linkage"
  162.     NdisWanParamKeyName      = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Parameters"
  163.     NdisWanLinkageKeyName    = $(!NTN_ServiceBase)"\"$(!ProductNDISWANName)"\Linkage"
  164.     RasAsyMacKeyName        = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)
  165.     RasAsyMacParamKeyName   = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Parameters"
  166.     RasMacLinkageKeyName    = $(!NTN_ServiceBase)"\"$(ProductRASASYMACName)"\Linkage"
  167.     RasTapiDevicesKeyName   = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASName)"\TAPI DEVICES"
  168.     LinkageKeyName          = $(!NTN_ServiceBase)"\"$(Product$(Option)Name)"\Linkage"
  169.     !ProductNDISWANKeyName    = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(!ProductNDISWANName)"\CurrentVersion"
  170.     ProductRASASYMACKeyName = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASASYMACName)"\CurrentVersion"
  171.     RasProtocolsKeyName     = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASName)"\PROTOCOLS"
  172.     UtilityInf     = "UTILITY.INF"
  173.     subroutninf    = "SUBROUTN.INF"
  174.     RascfgDll      = "RASCFG.DLL"
  175.     RasresDll      = "RASRES.DLL"
  176.     Exit_Code      = 0
  177.     ShellCode      = 0
  178.     from      = ""
  179.     to        = ""
  180.     ExitCodeOk     = 0
  181.     ExitCodeCancel = 1
  182.     ExitCodeFatal  = 2
  183.     KeyNull         = ""
  184.     !MAXIMUM_ALLOWED   = 33554432
  185.     !SERVICE_NO_CHANGE = 4294967295
  186.     RegistryErrorIndex = NO_ERROR
  187.     ServerSize  = 820116
  188.     ClientSize  = 634260
  189.     AdminSize   = 513962
  190.     FInstallServer = $(Chosen)
  191.     FInstallClient = $(Chosen)
  192.     FInstallAdmin  = $(Chosen)
  193. [UiVars]
  194.     VolumeList      = {} ? $(!LIBHANDLE) GetHardDriveLetters
  195.     VolumeFreeList  = {} ? $(!LIBHANDLE) GetHardDriveFreeSpace
  196.     VolumeFSList    = {} ? $(!LIBHANDLE) GetHardDriveFileSystems
  197.     DestVolume      = ""
  198.     MinHelpID   = 25000
  199.     MaxHelpID   = 25999
  200. [SystemVars]
  201.     !STF_WINDOWSPATH    = "" ? $(!LIBHANDLE) GetWindowsNtDir
  202.     !STF_WINDOWSSYSPATH = "" ? $(!LIBHANDLE) GetWindowsNtSysDir
  203.     !STF_COMPUTERNAME   = "" ? $(!LIBHANDLE) GetMyComputerName
  204.     !STF_USERNAME       = "" ? $(!LIBHANDLE) GetMyUserName
  205.     !STF_FLOPPYLIST     = {} ? $(!LIBHANDLE) GetFloppyDriveLetters
  206.     !STF_UNUSEDDRIVES   = {} ? $(!LIBHANDLE) GetUnusedDrives
  207.     !STF_LANGUAGE       = "ENG"
  208.     !NTN_SoftwareBase   = "Software"
  209.     !NTN_ServiceBase    = "System\CurrentControlSet\Services"
  210.     !NTN_ScUseRegistry  = "NO"
  211. [AvailableSystemMemory]
  212.     SystemMemory    = "" ? $(!LIBHANDLE) GetMemorySize
  213.     MinSystemMemory = 2048
  214. [date]
  215.     !CurrentDate = {} ? $(!LIBHANDLE) GetSystemDate
  216. [HelpContextIDs]
  217.     HC_RASOPTIONS     = 25020
  218.     HC_CLIENTACCESS   = 25021
  219.     HC_INSTALLOVER1   = 25022
  220.     HC_INSTALLOVER2   = 25023
  221. [Identify]
  222.     read-syms Identification
  223.     set Status     = STATUS_SUCCESSFUL
  224.     set Identifier = $(OptionType)
  225.     set Media      = #("Source Media Descriptions", 1, 1)
  226.     Return $(Status) $(Identifier) $(Media)
  227. [ReturnOptions]
  228.     set Status        = STATUS_FAILED
  229.     set OptionList     = {}
  230.     set OptionTextList = {}
  231.     set LanguageList = ^(LanguagesSupported, 1)
  232.     Ifcontains(i) $($0) in $(LanguageList)
  233.         goto returnoptions
  234.     Else
  235.         set Status = STATUS_NOLANGUAGE
  236.         goto finish_ReturnOptions
  237.     Endif
  238. returnoptions = +
  239.     set OptionList     = ^(Options, 1)
  240.     set OptionTextList = ^(OptionsText$($0), 1)
  241.     set Status         = STATUS_SUCCESSFUL
  242. finish_ReturnOptions = +
  243.     Return $(Status) $(OptionList) $(OptionTextList)
  244. [Shell Commands]
  245.     set Exit_Code = $(!STF_ERROR_GENERAL)
  246.     LoadLibrary "x" $(!STF_SRCDIR)\setupdll.dll !LIBHANDLE
  247.     set !NTN_InstallMode = configure
  248.     set !STF_HWND = 0
  249.     read-syms SystemVars
  250.     detect    SystemVars
  251.     Shell "" InstallOption $(!STF_LANGUAGE) "RAS" $(!STF_SRCDIR) "NO" "NO" "NO"
  252.     FreeLibrary $(!LIBHANDLE)
  253.     ifint $($ShellCode) != $( !SHELL_CODE_OK)
  254.        exit
  255.     endif
  256.     set Exit_Code = $($R0)
  257.     exit
  258. [InstallOption]
  259.     Debug-Output "In InstallOption section"
  260.     Debug-Output "Are we IDW? "$(!STF_IDW)
  261.     set Status   = STATUS_FAILED
  262.     set Option      = $($1)
  263.     set SourceDir   = $($2)
  264.     set AddCopy     = $($3)
  265.     set DoCopy      = $($4)
  266.     set DoConfig    = $($5)
  267.     set LanguageList = ^(LanguagesSupported, 1)
  268.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  269.         Return STATUS_NOLANGUAGE
  270.     endif
  271.     StartWait
  272.     set-subst LF = "\n"
  273.     read-syms UiVars
  274.     detect    UiVars
  275.     set !STF_NTPATH = $(!STF_WINDOWSSYSPATH)
  276.     GetDriveInPath !STF_NTDRIVE $(!STF_WINDOWSSYSPATH)
  277.     read-syms GeneralConstants
  278.     read-syms FileConstants
  279.     read-syms DialogConstants$(!STF_LANGUAGE)
  280.     read-syms FileConstants$(!STF_LANGUAGE)
  281.     detect date
  282.     read-syms HelpContextIDs
  283.     SetHelpFile $(!STF_CWDDIR)rassetup.hlp $(MinHelpID) $(MaxHelpID)
  284.     set-title  $(FunctionTitle)
  285.     set to   = Begin
  286.     set from = Begin
  287.     set CommonStatus = STATUS_SUCCESSFUL
  288.     Debug-Output "OEMNSVRA.INF: STF_CWDDIR is: "$(!STF_CWDDIR)
  289.     Debug-Output "OEMNSVRA.INF: STF_LANGUAGE is: "$(!STF_LANGUAGE)
  290.     Debug-Output "OEMNSVRA.INF: Option is: "$(Option)
  291.     Debug-Output "OEMNSVRA.INF: NTN_SoftwareBase is: "$(!NTN_SoftwareBase)
  292.     Debug-Output "OEMNSVRA.INF: NTN_ServiceBase is: "$(!NTN_ServiceBase)
  293.     EndWait
  294. Begin = +
  295.     set !NETCARD_LIST    = {}
  296.     set ServerInstalled = FALSE
  297.     set ClientInstalled = FALSE
  298.     set AdminInstalled  = FALSE
  299.     set DoServer     = TRUE
  300.     set DoClient     = TRUE
  301.     set DoAdmin      = TRUE
  302.     set DoServerOnly = FALSE
  303.     set DoClientOnly = FALSE
  304.     set DoAdminOnly  = FALSE
  305.     set DoRas        = FALSE
  306.     set DoRasSvr     = FALSE
  307.     set DoRasMan     = FALSE
  308.     set DoNdisWan     = FALSE
  309.     set DoRasAsyMac  = FALSE
  310.     IfStr(i) $(!NTN_InstallMode)    ==    deinstall
  311.         Set StartLabel = RemoveRas
  312.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  313.         set StartLabel = UpgradeRas
  314.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  315.         set StartLabel = ConfigureRas
  316.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  317.         set StartLabel = BindingsRas
  318.     else
  319.         set StartLabel = InstallRas
  320.     endif
  321.     set from = Begin
  322.     set to = end
  323.     goto $(StartLabel)
  324. InstallRas = +
  325.     StartWait
  326.     Debug-Output "In InstallRas Section"
  327.     Debug-Output "Origin is "$(!NTN_Origination)
  328.     Debug-Output "Install Mode "$(!NTN_InstallMode)
  329.     Debug-Output "Install phase "$(!NTN_InstallPhase)
  330.     Debug-Output "Copy Flag is "$(DoCopy)
  331.     Debug-Output "Option is "$(Option)
  332.     Debug-Output "SrcDir is "$(SourceDir)
  333.     Debug-Output "STF_WINDOWSPATH is "$(!STF_WINDOWSPATH)
  334.     Debug-Output "Context Inf name "$(STF_CONTEXTINFNAME)
  335.     set RasComponentsList = {} 
  336.     set NumInstalled = 0       
  337.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  338.     Ifstr $(KeyProduct) != $(KeyNull)
  339.         GetRegValue $(KeyProduct) "MajorVersion" VersionInfo
  340.         set VersionMajor = *($(VersionInfo), 4)
  341.         GetRegValue $(KeyProduct) "MinorVersion" VersionInfo
  342.         set VersionMinor = *($(VersionInfo), 4)
  343.         set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  344.         ifstr(i) $(ProductVersion) != $(InstalledVersion)
  345.             Shell "" QueryRasUpgrade $(ProductRASTitle) $(InstalledVersion) +
  346.                                      $(ProductVersion)
  347.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  348.                goto ShellCodeError
  349.             endif
  350.             Ifstr(i) $($R1) == "OK"
  351.                 set from = InstallRas
  352.                 set to   = InstallRas1
  353.                 goto RemoveRas
  354.             else
  355.                 goto end
  356.             endif
  357.         endif
  358.         shell "" QueryComponentsInstalled $(ProductKeyName)
  359.         Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  360.             Set RasComponentsList = $($R1)
  361.             Set InstalledFlags = $($R2)
  362.             Set ServerInstalled = *($(InstalledFlags),1)
  363.             Set ClientInstalled = *($(InstalledFlags),2)
  364.             Set AdminInstalled  = *($(InstalledFlags),3)
  365.         Endif
  366.         Debug-Output "Installed List is "$(RasComponentsList)
  367.         Debug-Output "Installed Flags is "$(InstalledFlags)
  368.         QueryListSize NumInstalled $(RasComponentsList)
  369.         ifint $(NumInstalled) == 3
  370.             read-syms VerExists$(!STF_LANGUAGE)
  371.             set Text = $(Product$(Option)Description)$(Ver)$(ProductVersion)+
  372.                        $(Text1)
  373.             Shell $(subroutninf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  374.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  375.                 Goto fatal
  376.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  377.                 Goto fatal
  378.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  379.                 Goto end
  380.             Endif
  381.             goto end
  382.         endif
  383.         CloseRegKey $(KeyProduct)
  384.     else
  385. InstallRas1 =+
  386.        set fRemoveRas   = TRUE
  387.     endif
  388.     goto memorycheck
  389. setupabort = +
  390.     read-syms SetupAbortDlg$(!STF_LANGUAGE)
  391.     ui start "SetupAbort"
  392.     ifstr(i) $(DLGEVENT) == "CONTINUE"
  393.         ui pop 1
  394.         Exit
  395.     else
  396.         ui pop 1
  397.         Exit
  398.     endif
  399. memorycheck = +
  400.     read-syms AvailableSystemMemory
  401.     detect AvailableSystemMemory
  402.     Debug-Output "Available Memory is "$(SystemMemory)
  403.     IfInt $(SystemMemory) < $(MinSystemMemory)
  404.         read-syms FatalErrorMem$(!STF_LANGUAGE)
  405.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "FATAL" $(Fatal)
  406.         goto setupabort
  407.     Else
  408.         goto InstallNetwork
  409.     EndIf
  410. InstallNetwork =+
  411.     ifstr(i) $(DoServer) == FALSE
  412.        ifstr(i) $(DoClient) == FALSE
  413.            goto CopyResources
  414.        endif
  415.     endif
  416.     goto CopyResources
  417. CopyResources = +
  418.     ifstr(i) $(!NTN_InstallMode) == "install"
  419.         Ifstr(i) $(DoCopy) == "YES"
  420.            Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SourceDir) YES
  421.            Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  422.                Goto ShellCodeError
  423.            Else-Ifstr(i) $($R0) == STATUS_FAILED
  424.                Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  425.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  426.                    goto ShellCodeError
  427.                endif
  428.                set Error = $($R0)
  429.                goto fatal
  430.            Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  431.                Goto end
  432.            Endif
  433.            Set !STF_SRCDIR = $($R1)
  434.            Set SourceDir  = $($R1)
  435.            Debug-Output "SrcDir "$(SourceDir)
  436.         endif
  437.         Debug-Output "OEMNSVRA.INF: Copying files"
  438.         set !OverWrite = TRUE 
  439.         Install InstallResources
  440.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  441.             goto filecopycancel
  442.         endif
  443.         install InstallRasFiles
  444.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  445.             goto filecopycancel
  446.         endif
  447.     endif
  448.     LoadLibrary "x" $(!STF_CWDDIR)rasres.dll RASDLGHANDLE
  449.     ifstr(i) $(DoAdminOnly) == TRUE
  450.         goto CommonCode
  451.     endif
  452.     Ifstr(i) $(!STF_IDW) == TRUE
  453.       set SrcFile = $(!STF_WINDOWSPATH)"\dump\rasether.dll"
  454.       set DestFile = $(!STF_WINDOWSSYSPATH)"\rasether.dll"
  455.       LibraryProcedure Status , $(!LIBHANDLE), CopySingleFile $(SrcFile) $(DestFile)
  456.       set BaseKey = $(!NTN_SoftwareBase)"\"$(Manufacturer)
  457.       set KeyRas = $(KeyNull)
  458.       OpenRegKey $(!REG_H_LOCAL) "" $(BaseKey) $(!MAXIMUM_ALLOWED) KeyBase
  459.       ifstr $(KeyBase) != $(KeyNull)
  460.         CreateRegKey $(KeyBase) {"RAS",$(NoTitle),GenericClass} ""  +
  461.                                  $(!MAXIMUM_ALLOWED) "" KeyRas
  462.         ifstr $(KeyRas) != $(KeyNull)
  463.          CreateRegKey $(KeyRas) {"OTHER DEVICES",$(NoTitle),GenericClass} ""  +
  464.                                 $(!MAXIMUM_ALLOWED) "" KeyOther
  465.          ifstr $(KeyOther) != $(KeyNull)
  466.              CreateRegKey $(KeyOther) {"INSTALLED",$(NoTitle),GenericClass} ""  +
  467.                                       $(!MAXIMUM_ALLOWED) "" KeyInstalled
  468.              ifstr $(KeyInstalled) != $(KeyNull)
  469.                CreateRegKey $(KeyInstalled)  +
  470.                                    {"EtherRas",$(NoTitle),GenericClass} ""  +
  471.                                    $(!MAXIMUM_ALLOWED) "" KeyEther
  472.                ifstr $(KeyEther) != $(KeyNull)
  473.                  SetRegValue $(KeyEther)  +
  474.                              {MediaType,$(NoTitle),$(!REG_VT_SZ),"RasEther"}
  475.                  ifstr(i) $(!STF_PRODUCT) == "WINNT"
  476.                      set NumDevices = 1
  477.                  else
  478.                      set NumDevices = 250
  479.                  endif
  480.                  SetRegValue $(KeyEther)  +
  481.                              {NumberOfDevices,$(NoTitle),$(!REG_VT_DWORD), $(NumDevices)}
  482.                  CloseRegKey $(KeyEther)
  483.                endif
  484.                CloseRegKey $(KeyInstalled)
  485.              endif
  486.              CloseRegKey $(KeyOther)
  487.          endif
  488.          CloseRegKey $(KeyRas)
  489.         endif
  490.         CloseRegKey $(KeyBase)
  491.       endif
  492.     endif
  493.     goto PortsConfigure
  494. ConfigureRas = +
  495.     set OldVersionExisted = $(TRUE)
  496.     StartWait
  497.     read-syms StatusDeterminingConfig$(!STF_LANGUAGE)
  498.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(ReadingConfig)
  499.     Set BillboardVisible = 1
  500.     shell "" QueryComponentsInstalled
  501.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  502.         Set InstalledComps = $($R1)
  503.         Set InstalledFlags = $($R2)
  504.         Set DoServer      = *($(InstalledFlags),1)
  505.         Set DoClient      = *($(InstalledFlags),2)
  506.         Set DoAdmin       = *($(InstalledFlags),3)
  507.         Set DoServerOnly  = *($(InstalledFlags),4)
  508.         Set DoClientOnly  = *($(InstalledFlags),5)
  509.         Set DoAdminOnly   = *($(InstalledFlags),6)
  510.     Endif
  511.     Set ServerInstalled = $(DoServer)
  512.     Set ClientInstalled = $(DoClient)
  513.     Set AdminInstalled  = $(DoAdmin)
  514.     Debug-Output "DoServer "$(DoServer)
  515.     Debug-Output "DoClient "$(DoClient)
  516.     Debug-Output "DoAdmin "$(DoAdmin)
  517.     Debug-Output "DoServerOnly "$(DoServerOnly)
  518.     Debug-Output "DoClientOnly "$(DoClientOnly)
  519.     Debug-Output "DoAdminOnly "$(DoAdminOnly)
  520.     EndWait
  521.     Ifint $(BillboardVisible) != 0
  522.         Shell "subroutn.inf" PopBillboard
  523.         Set BillboardVisible = 0
  524.     Endif
  525.     ifstr(i) $(DoAdminOnly) == TRUE
  526.         read-syms NoConfigAdmin$(!STF_LANGUAGE)
  527.         shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) "STATUS" $(NoConfigAdmin)
  528.         goto end
  529.     endif
  530.     LoadLibrary "x" $(!STF_CWDDIR)rasres.dll   RASDLGHANDLE
  531.     goto PortsConfigure
  532. PortsConfigure = +
  533.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  534.     set Result = {}
  535.     set fNetcardInstalled = FALSE
  536.     shell "" IsNetcardInstalled
  537.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  538.         set fNetcardInstalled = $($R1)
  539.     endif
  540.     Debug-Output "fNetcardInstalled Option "$(fNetcardInstalled)
  541. CheckProtocolsInstalled =+
  542.     shell "" QueryInstalledProtocols
  543.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  544.         set fNetbeuiInstalled = $($R1)
  545.         set fTcpIpInstalled   = $($R2)
  546.         set fIpxInstalled     = $($R3)
  547.     else
  548.         read-syms QueryInstalledProtocolsError$(!STF_LANGUAGE)
  549.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  550.         goto end
  551.     endif
  552.     StartWait
  553.     LibraryProcedure Result, $(PORTSDLGHANDLE), RasPortsConfig $(!STF_HWND) +
  554.                      $(!NTN_InstallMode) $(fNetcardInstalled) $(ProductPath) +
  555.                      $(fNetbeuiInstalled) $(fTcpIpInstalled) $(fIpxInstalled)
  556.     EndWait
  557.     set NewNumPorts   = 0
  558.     set NewNumTapiPorts = 0
  559.     set NewNumDialoutNBF = 0
  560.     set NewNumDialinNBF  = 0
  561.     set NewNumDialinIP = 0
  562.     set NewNumDialoutIP = 0
  563.     set NewNumDialinoutIPX = 0
  564.     set fSerialInstalled = FALSE
  565.     set fOtherInstalled = FALSE
  566.     set fNetbeuiChosen = FALSE
  567.     set fTcpIpChosen = FALSE
  568.     set fIpxChosen = FALSE
  569.     set fNetbeuiSelected = FALSE
  570.     set fTcpIpSelected = FALSE
  571.     set fIpxSelected = FALSE
  572.     set fNetbeuiAllowed = FALSE
  573.     set fTcpIpAllowed = FALSE
  574.     set fIpxAllowed = FALSE
  575.     set NewNumPorts       = *($(Result),1)
  576.     set NewNumTapiPorts   = *($(Result),2)
  577.     set NewNumPortsList = {}
  578.     set NullString   = ""
  579.     Debug-Output "PortsConfigure returned: "$(Result)
  580.     Debug-Output "PortsConfigure NewNumPorts: "$(NewNumPorts)
  581.     Debug-Output "PortsConfigure NewNumTapiPorts: "$(NewNumTapiPorts)
  582.     ifstr(i) $(NewNumPorts) == "EXITSETUP"
  583.         Debug-Output "PortsConfigre User selected ExitSetup."
  584.         goto RemoveDiskFiles
  585.     else-ifstr(i) $(NewNumPorts) == "NOPORTS"
  586.         Debug-Output "PortsConfigre: No serial ports detected."
  587.         goto RemoveDiskFiles
  588.     else-ifstr(i) $(NewNumPorts) == "BADARGS"
  589.         Debug-Output "PortsConfigre: bad arguments to dll."
  590.         goto RemoveDiskFiles
  591.     else-ifstr(i) $(NewNumPorts) == "FAILURE"
  592.         Debug-Output "PortsConfigre: Unknown failure."
  593.         goto RemoveDiskFiles
  594.     endif
  595.     goto PortsConfigure1
  596. RemoveDiskFiles = +
  597.     set CommonStatus = STATUS_NO_EFFECT
  598.     ifstr(i) $(!NTN_InstallMode) == "install"
  599.         goto filecopycancel
  600.     endif
  601.     goto end
  602. PortsConfigure1 = +
  603.     set NewNumDialoutNBF = *($(Result),3)
  604.     Debug-Output "PortsConfigure NewNumDialoutNBF: "$(NewNumDialoutNBF)
  605.     set NewNumDialinNBF  = *($(Result),4)
  606.     Debug-Output "PortsConfigure NewNumDialinNBF: "$(NewNumDialinNBF)
  607.     set fSerialInstalled = *($(Result),5)
  608.     Debug-Output "PortsConfigure fSerialInstalled: "$(fSerialInstalled)
  609.     set fOtherInstalled = *($(Result),6)
  610.     Debug-Output "PortsConfigure fOtherInstalled: "$(fOtherInstalled)
  611.     ifstr(i) $(fSerialInstalled) == TRUE
  612.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  613.     else-ifstr(i) $(fOtherInstalled) == TRUE
  614.         set NewNumPortsList = >($(NewNumPortsList), $(NullString)$(NewNumPorts)$(NullString))
  615.     endif
  616.     set fNetbeuiSelected = *($(Result),7)
  617.     Debug-Output "PortsConfigure NetbeuiSelected: "$(fNetbeuiSelected)
  618.     set fTcpIpSelected = *($(Result),8)
  619.     Debug-Output "PortsConfigure TcpIpSelected: "$(fTcpIpSelected)
  620.     set fIpxSelected = *($(Result),9)
  621.     Debug-Output "PortsConfigure IpxSelected: "$(fIpxSelected)
  622.     set fNetbeuiAllowed = *($(Result),10)
  623.     Debug-Output "PortsConfigure NetbeuiAllowed: "$(fNetbeuiAllowed)
  624.     set fTcpIpAllowed = *($(Result),11)
  625.     Debug-Output "PortsConfigure TcpIpAllowed: "$(fTcpIpAllowed)
  626.     set fIpxAllowed = *($(Result),12)
  627.     Debug-Output "PortsConfigure IpxAllowed: "$(fIpxAllowed)
  628.     ifstr(i) $(fNetbeuiSelected) == TRUE
  629.         set fNetbeuiChosen = TRUE
  630.     else
  631.         set fNetbeuiChosen = $(fNetbeuiAllowed)
  632.     endif
  633.     ifstr(i) $(fTcpIpSelected) == TRUE
  634.         set fTcpIpChosen = TRUE
  635.     else
  636.         set fTcpIpChosen = $(fTcpIpAllowed)
  637.     endif
  638.     ifstr(i) $(fIpxSelected) == TRUE
  639.         set fIpxChosen = TRUE
  640.     else
  641.         set fIpxChosen = $(fIpxAllowed)
  642.     endif
  643.     ifstr(i) $(fTcpIpSelected) == TRUE
  644.         set NewNumDialoutIP = $(NewNumDialoutNBF)
  645.     endif
  646.     ifint $(NewNumDialinNBF) != 0
  647.          ifstr(i) $(fTcpIpAllowed) == TRUE
  648.              set NewNumDialinIP = 1
  649.          endif
  650.     endif
  651.     Debug-Output "NewNumDialinIP: "$(NewNumDialinIP)
  652.     Debug-Output "NewNumDialoutIP: "$(NewNumDialoutIP)
  653.     ifstr(i) $(fIpxChosen) == TRUE
  654.         set NewNumDialinoutIPX = 1
  655.         Debug-Output "IPX Selected - NewNumDialinoutIPX: "$(NewNumDialinoutIPX)
  656.     endif
  657.     ifstr(i) $(fIpxAllowed) == TRUE
  658.         set EnableIpxRouter = 1
  659.     else
  660.         set EnableIpxRouter = 0
  661.     endif
  662.     ifstr(i) $(fNetbeuiAllowed) == FALSE
  663.          set NewNumDialinNBF = 0
  664.     endif
  665.     ifstr(i) $(fNetbeuiSelected) == FALSE
  666.         set NewNumDialoutNBF = 0
  667.     endif
  668.     Debug-Output "NewNumDialinNbf: "$(NewNumDialinNBF)
  669.     Debug-Output "NewNumDialoutNbf: "$(NewNumDialoutNBF)
  670.     set NetBiosGtwyEnabled = 0
  671.     set EnableIpRouter     = 0
  672.     set EnableWanRouter    = 0
  673.     Shell "" GetNetworkAccess
  674.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  675.         Debug-Output "error shelling GetNetworkAccess."
  676.         goto ShellCodeError
  677.     endif
  678.     set NetBiosGtwyEnabled = $($R1)
  679.     set EnableIpRouter     = $($R2)
  680.     set EnableWanRouter    = $($R3)
  681.     ifint $(NetBiosGtwyEnabled) == 0
  682.         ifstr(i) $(fNetbeuiAllowed) == TRUE
  683.             set-add NewNumDialoutNBF  = $(NewNumDialoutNBF), $(NewNumDialinNBF)
  684.             set     NewNumDialinNBF = 0
  685.             Debug-Output "Mapped dialin ports to dialout ports "$(NewNumDialoutNBF)
  686.         endif
  687.     endif
  688.     set NewNumDialin = 0
  689.     set NewNumDialout = 0
  690.     set-add NewNumDialin = $(NewNumDialinNBF), $(NewNumDialinIP)
  691.     ifstr(i) $(fIpxAllowed) == TRUE
  692.         set-add NewNumDialin = $(NewNumDialin), $(NewNumDialinoutIPX)
  693.     endif
  694.     set-add NewNumDialout = $(NewNumDialoutNBF), $(NewNumDialoutIP)
  695.     ifstr(i) $(fIpxSelected) == TRUE
  696.         set-add NewNumDialout = $(NewNumDialout), $(NewNumDialinoutIPX)
  697.     endif
  698.     ifstr(i) $(fNetcardInstalled) == FALSE
  699.         ifint $(NewNumDialin) != 0
  700.             read-syms InstallLoopback$(!STF_LANGUAGE)
  701.             Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Message)
  702.         endif
  703.     endif
  704.     goto CommonCode
  705. CommonCode = +
  706.     ifstr(i) $(OldVersionExisted) == $(TRUE)
  707.         ifstr(i) $(!NTN_InstallMode) == configure
  708.            goto WriteParameters
  709.         endif
  710.     endif
  711.     QueryListSize ListCount $(RasComponentsList)
  712.     ifint $(ListCount) == 0
  713.         goto FirstTimeInstall
  714.     else
  715.         ifstr(i) $(DoServer) == TRUE
  716.             ifstr(i) $(ClientInstalled) == FALSE
  717.                 ifstr(i) $(AdminInstalled) == FALSE
  718.                     set DoRas    = TRUE
  719.                 endif
  720.                 set DoRasSvr     = TRUE
  721.                 set DoRasMan     = TRUE
  722.                 set DoNdisWan      = TRUE
  723.                 set DoRasAsyMac  = TRUE
  724.             else
  725.                 set DoRasSvr     = TRUE
  726.             endif
  727.             set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  728.         endif
  729.         ifstr(i) $(DoClient) == TRUE
  730.             ifstr(i) $(ServerInstalled) == FALSE
  731.                 ifstr(i) $(AdminInstalled) == FALSE
  732.                     set DoRas    = TRUE
  733.                 endif
  734.                 set DoRasMan     = TRUE
  735.                 set DoNdisWan      = TRUE
  736.                 set DoRasAsyMac  = TRUE
  737.             endif
  738.             set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  739.         endif
  740.         ifstr(i) $(DoAdmin) == TRUE
  741.             ifstr(i) $(ServerInstalled) == FALSE
  742.                 ifstr(i) $(ClientInstalled) == FALSE
  743.                     set DoRas = TRUE
  744.                 endif
  745.             endif
  746.             set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  747.         endif
  748.         shell "" UpdateComponentsInstalled $(RasComponentsList) $(ProductKeyName)
  749.         goto FirstTimeInstall-1
  750.     endif
  751. FirstTimeInstall =+
  752.     ifstr(i) $(DoServer) == TRUE
  753.         set DoRas             = TRUE
  754.         set DoRasSvr          = TRUE
  755.         set DoRasMan          = TRUE
  756.         set DoNdisWan           = TRUE
  757.         set DoRasAsyMac       = TRUE
  758.         set RasComponentsList = >($(RasComponentsList), $(RasServerOption))
  759.     endif
  760.     ifstr(i) $(DoClient) == TRUE
  761.         set DoRas             = TRUE
  762.         set DoRasMan          = TRUE
  763.         set DoNdisWan           = TRUE
  764.         set DoRasAsyMac       = TRUE
  765.         set RasComponentsList = >($(RasComponentsList), $(RasClientOption))
  766.     endif
  767.     ifstr(i) $(DoAdmin) == TRUE
  768.         set DoRas             = TRUE
  769.         set RasComponentsList = >($(RasComponentsList), $(RasAdminOption))
  770.     endif
  771. FirstTimeInstall-1 = +
  772.     ifstr(i) $(DoRas) == TRUE
  773.         StartWait
  774.         read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  775.         shell $(subroutninf) PushBillBoard NETSTATUSDLG $(CreatingRas)
  776.         Set BillboardVisible = 1
  777.         set ThisOption = RAS
  778.         Shell $(UtilityInf), InstallSoftwareProduct, $(Manufacturer),+
  779.               $(Product$(ThisOption)Name), $(ProductInfName)
  780.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  781.               Debug-Output "InstallSoftware bombed out."
  782.               goto ShellCodeError
  783.         endif
  784.         set RegistryErrorIndex = $($R0)
  785.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  786.             Debug-Output "REGISTRY GOODAL"
  787.             EndWait
  788.             CloseRegKey $($R1)
  789.             CloseRegKey $($R2)
  790.             goto fatalregistry
  791.         endif
  792.         Set SoftProductKey    = $($R1)
  793.         Set SoftNetRuleKey    = $($R2)
  794.         set NewValueList = +
  795.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)},+
  796.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  797.               $(Product$(ThisOption)SvcType)},+
  798.              {Title,$(NoTitle),$(!REG_VT_SZ), $(Product$(ThisOption)Title)},+
  799.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  800.               $(Product$(ThisOption)Description)},+
  801.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  802.               $(Product$(ThisOption)ImagePath)},+
  803.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  804.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  805.              {RasComponents,$(NoTitle),$(!REG_VT_MULTI_SZ),$(RasComponentsList)},+
  806.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)}}
  807.         Shell $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  808.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  809.             CloseRegKey $(SoftProductKey)
  810.             CloseRegKey $(SoftNetRuleKey)
  811.             goto ShellCodeError
  812.         endif
  813.         set RegistryErrorIndex = $($R0)
  814.         CloseRegKey $(SoftProductKey)
  815.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  816.            EndWait
  817.            CloseRegKey $(SoftNetRuleKey)
  818.            goto fatalregistry
  819.         endif
  820.         set NewValueList = +
  821.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  822.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  823.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  824.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  825.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  826.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  827.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  828.             goto addrastoregistryend
  829.         endif
  830.         set RegistryErrorIndex = $($R0)
  831.         CloseRegKey $(SoftNetRuleKey)
  832.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  833.             EndWait
  834.             goto fatalregistry
  835.         endif
  836.     endif 
  837.     ifstr(i) $(DoRasSvr) == TRUE
  838.         set ThisOption = RASSVR
  839.         set RasSpecificString = $(Product$(ThisOption)Name)
  840.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  841.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  842.               $(Product$(ThisOption)DisplayName), +
  843.               $(ProductInfName), $(Product$(ThisOption)ImagePath),+
  844.               "service", "Network", {"LanmanServer","RasMan"}, "", +
  845.               $(RasMsgDll), $(EventTypeSupported)
  846.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  847.             Debug-Output "DoRasSvr: AddSoftware bombed out"
  848.             goto ShellCodeError
  849.         endif
  850.         set RegistryErrorIndex = $($R0)
  851.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  852.             EndWait
  853.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  854.             CloseRegKey $($R1)
  855.             CloseRegKey $($R2)
  856.             CloseRegKey $($R3)
  857.             CloseRegKey $($R4)
  858.             CloseRegKey $($R5)
  859.             goto fatalregistry
  860.         endif
  861.         Set SoftProductKey    = $($R1)
  862.         Set SoftNetRuleKey    = $($R2)
  863.         set SoftServiceKey    = $($R3)
  864.         Set SoftParamsKey     = $($R4)
  865.         Set SoftLinkageKey    = $($R5)
  866.         set NewValueList = +
  867.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)},+
  868.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  869.               $(Product$(ThisOption)Name)},+
  870.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  871.               $(Product$(ThisOption)SvcType)},+
  872.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  873.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  874.               $(Product$(ThisOption)Description)},+
  875.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  876.               $(Product$(ThisOption)ImagePath)},+
  877.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  878.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  879.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  880.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  881.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  882.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  883.             Debug-Output "DoRasSvr:product: AddValueList bombed out"
  884.             goto ShellCodeError
  885.         endif
  886.         set RegistryErrorIndex = $($R0)
  887.         CloseRegKey $(SoftProductKey)
  888.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  889.             EndWait
  890.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  891.             CloseRegKey $(SoftServiceKey)
  892.             CloseRegKey $(SoftNetRuleKey)
  893.             CloseRegKey $(SoftLinkageKey)
  894.             CloseRegKey $(SoftParamsKey)
  895.             goto fatalregistry
  896.         endif
  897.         set NewValueList = +
  898.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  899.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  900.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  901.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  902.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  903.               $(NetRule$(ThisOption)BindForm)}, +
  904.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  905.               $(NetRule$(ThisOption)Bindable)}, +
  906.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  907.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  908.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  909.             Debug-Output "DoRasSvr:netrules: AddValueList bombed out"
  910.             goto ShellCodeError
  911.         endif
  912.         set RegistryErrorIndex = $($R0)
  913.         CloseRegKey $(SoftNetRuleKey)
  914.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  915.             CloseRegKey $(SoftServiceKey)
  916.             CloseRegKey $(SoftLinkageKey)
  917.             CloseRegKey $(SoftParamsKey)
  918.             EndWait
  919.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  920.             goto fatalregistry
  921.         endif
  922.         set RasDependencies = {}
  923.         ifstr(i) $(!STF_PRODUCT) == "LANMANNT"
  924.             set RasDependencies = {"Netlogon","LanmanServer","RasMan"}
  925.         else
  926.             set RasDependencies = {"LanmanServer","RasMan"}
  927.         endif
  928.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NetBios" $(!MAXIMUM_ALLOWED) KeyNetBios
  929.         ifstr $(KeyNetBios) != $(KeyNull)
  930.             set RasDependencies = >($(RasDependencies),"NetBios")
  931.         endif
  932.         Debug-Output "DoRasSvr: Adding RasDependencies "$(RasDependencies)
  933.         set NewValueList = +
  934.             {{OtherDependencies, $(NoTitle), $(!REG_VT_MULTI_SZ),+
  935.               $(RasDependencies)}}
  936.         Shell  $(UtilityInf), AddValueList, $(SoftLinkageKey), $(NewValueList)
  937.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  938.             Debug-Output "DoRasSvr:Linkage: AddValueList bombed out"
  939.             goto ShellCodeError
  940.         endif
  941.         set RegistryErrorIndex = $($R0)
  942.         CloseRegKey $(SoftLinkageKey)
  943.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  944.             CloseRegKey $(SoftServiceKey)
  945.             EndWait
  946.             Debug-Output "DoRasSvr: Registry Error "$(RegistryErrorIndex)
  947.             goto fatalregistry
  948.         endif
  949.         set NewValueList = +
  950.             {{AuthenticateRetries, $(NoTitle), $(!REG_VT_DWORD), 2},+
  951.             {AuthenticateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  952.             {Autodisconnect, $(NoTitle), $(!REG_VT_DWORD), 20},+
  953.             {EnableAudit, $(NoTitle), $(!REG_VT_DWORD), 1},+
  954.             {CallbackTime, $(NoTitle), $(!REG_VT_DWORD), 2}}
  955.         Shell  $(UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  956.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  957.              Debug-Output "AddValueList bombed out"
  958.              goto ShellCodeError
  959.         endif
  960.         set RegistryErrorIndex = $($R0)
  961.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  962.             CloseRegKey $(SoftServiceKey)
  963.             goto fatalregistry
  964.         endif
  965.         OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  966.         ifstr $(KeyNtbiosGtwy) == $(KeyNull)
  967.             CreateRegKey $(SoftParamsKey) {"NetBiosGateway",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyNetbiosGtwy
  968.             OpenRegKey $(SoftParamsKey) "" "NetBiosGateway" $(!MAXIMUM_ALLOWED) KeyNetbiosGtwy
  969.         endif
  970.         set NewValueList = +
  971.             {{EnableBroadcast, $(NoTitle), $(!REG_VT_DWORD), 0},+
  972.             {EnableNetbiosSessionsAuditing, $(NoTitle), $(!REG_VT_DWORD), 0},+
  973.             {MaxDynMem, $(NoTitle), $(!REG_VT_DWORD), 655350},+
  974.             {MaxNames, $(NoTitle), $(!REG_VT_DWORD), 255},+
  975.             {MaxSessions, $(NoTitle), $(!REG_VT_DWORD), 255},+
  976.             {MulticastForwardRate, $(NoTitle), $(!REG_VT_DWORD), 5},+
  977.             {SizWorkbuf, $(NoTitle), $(!REG_VT_DWORD), 4500},+
  978.             {RemoteListen, $(NoTitle), $(!REG_VT_DWORD), 1},+
  979.             {NameUpdateTime, $(NoTitle), $(!REG_VT_DWORD), 120},+
  980.             {MaxDgBufferedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 10},+
  981.             {RcvDgSubmittedPerGroupName, $(NoTitle), $(!REG_VT_DWORD), 3},+
  982.             {DisableMcastFwdWhenSessionTraffic, $(NoTitle), $(!REG_VT_DWORD), 1},+
  983.             {MaxBcastDgBuffered, $(NoTitle), $(!REG_VT_DWORD), 32},+
  984.             {NumRecvQueryIndications, $(NoTitle), $(!REG_VT_DWORD), 3}}
  985.         Shell  $(UtilityInf), AddValueList, $(KeyNetbiosGtwy), $(NewValueList)
  986.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  987.              Debug-Output "AddValueList bombed out"
  988.              goto ShellCodeError
  989.         endif
  990.         set RegistryErrorIndex = $($R0)
  991.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  992.             CloseRegKey $(SoftServiceKey)
  993.             goto fatalregistry
  994.         endif
  995.         CloseRegKey $(KeyNetbiosGtwy)
  996.         CloseRegKey $(SoftParamsKey)
  997.         Shell "" UpdatePerfmonInfoHelper $(SoftServiceKey)
  998.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  999.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  1000.             goto ShellCodeError
  1001.         endif
  1002.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1003.             Debug-Output "error returned by UpdatePerfmonInfoHelper."
  1004.         endif
  1005.         CloseRegKey $(SoftServiceKey)
  1006.     endif 
  1007. InstallRasMan = +
  1008.     ifstr(i) $(DoRasMan) == TRUE
  1009.         set ThisOption = RASMAN
  1010.         set RasSpecificString = $(Product$(ThisOption)Name)
  1011.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  1012.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1013.               $(Product$(ThisOption)DisplayName), +
  1014.               $(ProductInfName), $(Product$(ThisOption)ImagePath), "service",+
  1015.               "Network", {}, "", $(RasMsgDll), $(EventTypeSupported)
  1016.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1017.             Debug-Output "AddSoftware bombed out"
  1018.             goto ShellCodeError
  1019.         endif
  1020.         set RegistryErrorIndex = $($R0)
  1021.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1022.             EndWait
  1023.             CloseRegKey $($R1)
  1024.             CloseRegKey $($R2)
  1025.             CloseRegKey $($R3)
  1026.             CloseRegKey $($R4)
  1027.             CloseRegKey $($R5)
  1028.             goto fatalregistry
  1029.         endif
  1030.         Set SoftProductKey    = $($R1)
  1031.         Set SoftNetRuleKey    = $($R2)
  1032.         CloseRegKey $($R3)
  1033.         Set SoftParamsKey     = $($R4)
  1034.         CloseRegKey $($R5)
  1035.         set NewValueList = +
  1036.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)},+
  1037.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1038.               $(Product$(ThisOption)Name)},+
  1039.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1040.               $(Product$(ThisOption)SvcType)},+
  1041.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1042.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1043.               $(Product$(ThisOption)Description)},+
  1044.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1045.               $(Product$(ThisOption)ImagePath)},+
  1046.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  1047.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  1048.              {Review, $(NoTitle), $(!REG_VT_DWORD), $(fReviewBindings)}, +
  1049.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1050.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  1051.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1052.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1053.             Debug-Output "AddValueList bombed out"
  1054.             goto ShellCodeError
  1055.         endif
  1056.         set RegistryErrorIndex = $($R0)
  1057.         CloseRegKey $(SoftProductKey)
  1058.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1059.             EndWait
  1060.             CloseRegKey $(SoftNetRuleKey)
  1061.             CloseRegKey $(SoftParamsKey)
  1062.             goto fatalregistry
  1063.         endif
  1064.         set NewValueList = +
  1065.             {{class, $(NoTitle), $(!REG_VT_SZ), $(NetRule$(ThisOption)Class)},+
  1066.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1067.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1068.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1069.               $(NetRule$(ThisOption)BindForm)}, +
  1070.              {bindable,$(NoTitle),$(!REG_VT_SZ),+
  1071.               $(NetRule$(ThisOption)Bindable)}, +
  1072.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1073.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  1074.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1075.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1076.             Debug-Output "AddValueList bombed out"
  1077.             goto ShellCodeError
  1078.         endif
  1079.         set RegistryErrorIndex = $($R0)
  1080.         CloseRegKey $(SoftNetRuleKey)
  1081.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1082.             EndWait
  1083.             goto fatalregistry
  1084.         endif
  1085.         set NewValueList = {{Logging, $(NoTitle), $(!REG_VT_DWORD), 0}}
  1086.         Shell  $(UtilityInf), AddValueList, $(SoftParamsKey), $(NewValueList)
  1087.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1088.              Debug-Output "AddValueList bombed out"
  1089.              goto ShellCodeError
  1090.         endif
  1091.         set RegistryErrorIndex = $($R0)
  1092.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1093.             goto fatalregistry
  1094.         endif
  1095.         CloseRegKey $(SoftParamsKey)
  1096.     endif 
  1097.     ifstr(i) $(DoNdisWan) == TRUE
  1098.         set ThisOption = NDISWAN
  1099.         set RasSpecificString = $(Product$(ThisOption)Name)
  1100.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  1101.               $(!Product$(ThisOption)Name), $(!Product$(ThisOption)Name), +
  1102.               $(!Product$(ThisOption)DisplayName), +
  1103.               $(ProductInfName), $(!Product$(ThisOption)ImagePath),+
  1104.               "kernelautostart", "NDISWAN", {}, "", +
  1105.               $(RasMsgDll), $(EventTypeSupported)
  1106.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1107.             Debug-Output "AddSoftware bombed out"
  1108.             goto ShellCodeError
  1109.         endif
  1110.         set RegistryErrorIndex = $($R0)
  1111.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1112.             EndWait
  1113.             CloseRegKey $($R1)
  1114.             CloseRegKey $($R2)
  1115.             CloseRegKey $($R3)
  1116.             CloseRegKey $($R4)
  1117.             CloseRegKey $($R5)
  1118.             goto fatalregistry
  1119.         endif
  1120.         Set SoftProductKey    = $($R1)
  1121.         Set SoftNetRuleKey    = $($R2)
  1122.         CloseRegKey $($R3)
  1123.         CloseRegKey $($R4)
  1124.         CloseRegKey $($R5)
  1125.         set NewValueList = +
  1126.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)},+
  1127.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1128.               $(!Product$(ThisOption)Name)},+
  1129.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1130.               $(Product$(ThisOption)Type)},+
  1131.              {Title,$(NoTitle),$(!REG_VT_SZ),$(!Product$(ThisOption)Title)},+
  1132.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1133.               $(!Product$(ThisOption)Description)},+
  1134.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1135.               $(!Product$(ThisOption)ImagePath)},+
  1136.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  1137.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  1138.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1139.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1140.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  1141.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1142.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1143.             Debug-Output "AddValueList bombed out"
  1144.             goto ShellCodeError
  1145.         endif
  1146.         set RegistryErrorIndex = $($R0)
  1147.         CloseRegKey $(SoftProductKey)
  1148.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1149.             EndWait
  1150.             CloseRegKey $(SoftNetRuleKey)
  1151.             goto fatalregistry
  1152.         endif
  1153.         set NewValueList = +
  1154.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(!NetRule$(ThisOption)Class)},+
  1155.              {type,$(NoTitle),$(!REG_VT_SZ),$(!NetRule$(ThisOption)Type)},+
  1156.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1157.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1158.               $(!NetRule$(ThisOption)BindForm)}, +
  1159.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1160.               $(!NetRule$(ThisOption)Bindable)}, +
  1161.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1162.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  1163.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1164.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1165.             Debug-Output "AddValueList bombed out"
  1166.             goto ShellCodeError
  1167.         endif
  1168.         set RegistryErrorIndex = $($R0)
  1169.         CloseRegKey $(SoftNetRuleKey)
  1170.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1171.             EndWait
  1172.             goto fatalregistry
  1173.         endif
  1174.         Shell "" InstallNdisWanBHAdapter
  1175.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1176.            Debug-Output "Cannot add NdisWan Blood hound adapter"
  1177.            goto ShellCodeError
  1178.         endif
  1179.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1180.              set RegistryErrorIndex = $($R0)
  1181.              Debug-Output "Error installing NdisWan Blood hound adapter"
  1182.              goto fatalregistry
  1183.         endif
  1184.         Shell "" AddNDISWANToServiceGroupOrder
  1185.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1186.            Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  1187.            goto ShellCodeError
  1188.         endif
  1189. DoNdisWanEnd = +
  1190.     endif 
  1191.     ifstr(i) $(DoRasAsyMac) == TRUE
  1192.         set ThisOption = RASASYMAC
  1193.         set RasSpecificString = $(Product$(ThisOption)Name)
  1194.         ifstr(i) $(fSerialInstalled) == TRUE
  1195.             set AsySoftwareType = "kernelautostart"
  1196.         else-ifstr(i) $(fOtherInstalled) == TRUE
  1197.             set AsySoftwareType = "kernelautostart"
  1198.         else
  1199.             set AsySoftwareType = "kerneldisable"
  1200.         endif
  1201.         Shell $(UtilityInf), AddSoftwareComponent, $(Manufacturer), +
  1202.               $(Product$(ThisOption)Name), $(Product$(ThisOption)Name), +
  1203.               $(Product$(ThisOption)DisplayName), +
  1204.               $(ProductInfName), $(Product$(ThisOption)ImagePath), $(AsySoftwareType),+
  1205.               "NDIS", {}, "", $(RasMsgDll), $(EventTypeSupported)
  1206.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1207.             Debug-Output "AddSoftware bombed out"
  1208.             goto ShellCodeError
  1209.         endif
  1210.         set RegistryErrorIndex = $($R0)
  1211.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1212.             EndWait
  1213.             CloseRegKey $($R1)
  1214.             CloseRegKey $($R2)
  1215.             CloseRegKey $($R3)
  1216.             CloseRegKey $($R4)
  1217.             CloseRegKey $($R5)
  1218.             goto fatalregistry
  1219.         endif
  1220.         Set SoftProductKey    = $($R1)
  1221.         Set SoftNetRuleKey    = $($R2)
  1222.         CloseRegKey $($R3)
  1223.         CloseRegKey $($R4)
  1224.         CloseRegKey $($R5)
  1225.         set NewValueList = +
  1226.             {{Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)},+
  1227.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),+
  1228.               $(Product$(ThisOption)Name)},+
  1229.              {SoftwareType,$(NoTitle),$(!REG_VT_SZ),+
  1230.           $(Product$(ThisOption)Type)},+
  1231.              {Title,$(NoTitle),$(!REG_VT_SZ),$(Product$(ThisOption)Title)},+
  1232.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1233.               $(Product$(ThisOption)Description)},+
  1234.              {PathName,$(NoTitle),$(!REG_VT_SZ),+
  1235.               $(Product$(ThisOption)ImagePath)},+
  1236.              {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  1237.              {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  1238.              {BindControl,$(NoTitle),$(!REG_VT_DWORD),$(HideBindings)},+
  1239.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1240.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  1241.         Shell  $(UtilityInf), AddValueList, $(SoftProductKey), $(NewValueList)
  1242.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1243.             Debug-Output "AddValueList bombed out"
  1244.             goto ShellCodeError
  1245.         endif
  1246.         set RegistryErrorIndex = $($R0)
  1247.         CloseRegKey $(SoftProductKey)
  1248.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1249.             EndWait
  1250.             CloseRegKey $(SoftNetRuleKey)
  1251.             goto fatalregistry
  1252.         endif
  1253.         set NewValueList = +
  1254.         {{class, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NetRule$(ThisOption)Class)},+
  1255.              {type,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Type)},+
  1256.              {use,$(NoTitle),$(!REG_VT_SZ),$(NetRule$(ThisOption)Use)}, +
  1257.              {bindform,$(NoTitle),$(!REG_VT_SZ),+
  1258.               $(NetRule$(ThisOption)BindForm)}, +
  1259.              {bindable,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1260.               $(!NetRule$(ThisOption)Bindable)}, +
  1261.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1262.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  1263.         Shell  $(UtilityInf), AddValueList, $(SoftNetRuleKey), $(NewValueList)
  1264.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1265.             Debug-Output "AddValueList bombed out"
  1266.             goto ShellCodeError
  1267.         endif
  1268.         set RegistryErrorIndex = $($R0)
  1269.         CloseRegKey $(SoftNetRuleKey)
  1270.         Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1271.             EndWait
  1272.             goto fatalregistry
  1273.         endif
  1274.         Shell $(UtilityInf), AddHardwareComponent, +
  1275.               $(Product$(ThisOption)Name),$(ProductInfName),+
  1276.               $(Product$(ThisOption)KeyName)
  1277.         ifint $($R4) != -1
  1278.             Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1279.                                  {$(Product$(ThisOption)Name),+
  1280.                                  $(!NetworkCardKeyName)"\"$($R4)})
  1281.         endif
  1282.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1283.            Debug-Output "Cannot add hardware component"
  1284.            goto ShellCodeError
  1285.         endif
  1286.         set RegistryErrorIndex = $($R0)
  1287.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1288.             EndWait
  1289.             Debug-Output "Registry error: add hardware component"
  1290.             CloseRegKey $($R1)
  1291.             CloseRegKey $($R2)
  1292.             CloseRegKey $($R3)
  1293.             goto fatalregistry
  1294.         endif
  1295.         set KeyNetcard    = $($R1)
  1296.         set KeyParameters = $($R3)
  1297.         set KeyAdapterRules = $($R2)
  1298.         set AdapterNumber = $($R4)
  1299.         set NewValueList = +
  1300.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1301.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1302.               "["$($R4)"] "$(Product$(ThisOption)Title)},+
  1303.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1304.               $(Product$(ThisOption)Description)},+
  1305.              {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1306.               $(Product$(ThisOption)Name)},+
  1307.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1308.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1309.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  1310.         Shell  $(UtilityInf), AddValueList, $(KeyNetcard), $(NewValueList)
  1311.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1312.             Debug-Output "ShellCode error"
  1313.             goto ShellCodeError
  1314.         endif
  1315.         CloseRegKey $(KeyNetcard)
  1316.         set TempProdName = """"$(Product$(ThisOption)Name)$(AdapterNumber)""""
  1317.         set TempBindForm = $(TempProdName)$(NetRuleHardware$(ThisOption)BindForm)
  1318.         set NewValueList = +
  1319.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1320.               $(NetRuleHardware$(ThisOption)Type)},+
  1321.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  1322.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1323.               $(NetRuleHardware$(ThisOption)Class)}, +
  1324.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  1325.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  1326.         Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(NewValueList)
  1327.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1328.             Debug-Output "ShellCode error."
  1329.             goto ShellCodeError
  1330.         endif
  1331.         set RegistryErrorIndex = $($R0)
  1332.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1333.             EndWait
  1334.             Debug-Output "Resgitry error: add value list."
  1335.             CloseRegKey $(KeyParameters)
  1336.             CloseRegKey $(KeyAdapterRules)
  1337.             goto fatalregistry
  1338.         endif
  1339.         CloseRegKey $(KeyAdapterRules)
  1340.         CloseRegKey $(KeyParameters)
  1341.     endif 
  1342.     Shell "" InstallNdisTapiService
  1343.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1344.          Debug-Output "Error shelling InstallNdisTapiService "
  1345.          goto ShellCodeError
  1346.     endif
  1347.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1348.          set RegistryErrorIndex = $($R0)
  1349.          Debug-Output "Error installing NdisTapi Service"
  1350.          goto fatalregistry
  1351.     endif
  1352.     goto WriteParameters
  1353. WriteParameters = +
  1354.     ifstr(i) $(DoAdminOnly) == TRUE
  1355.         goto WriteParametersOver
  1356.     endif
  1357.     StartWait
  1358.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  1359.     shell $(subroutninf) PushBillBoard NETSTATUSDLG $(WritingRasParams)
  1360.     Set BillboardVisible = 1
  1361.     Debug-Output "Writing Registry Parameters."
  1362.     ifstr(i) $(DoServer) != TRUE
  1363.         goto WriteRasMan
  1364.     endif
  1365.     Debug-Output "OEMNSVRA.INF: Product type "$(!STF_PRODUCT)
  1366.     Debug-Output "OEMNSVRA.INF: Total dialin ports "$(NewNumDialin)
  1367.     set RasStartValue = 3
  1368.     ifstr(i) $(!STF_PRODUCT) != "WINNT"
  1369.         ifint $(NewNumDialin) != 0
  1370.             set RasStartValue = 2
  1371.         endif
  1372.     endif
  1373.     set KeySvr = $(KeyNull)
  1374.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) $(!MAXIMUM_ALLOWED) KeySvr
  1375.     ifstr $(KeySvr) == $(KeyNull)
  1376.         Debug-Output "OEMNSVRA.INF: could not open RemoteAccess key"
  1377.     else
  1378.         ifstr(i) $(!NTN_InstallMode) != install
  1379.             GetRegValue $(KeySvr) "Start" StartList
  1380.             ifint $(RegLastError) == 0
  1381.                 set RasStartValue = *($(StartList), 4)
  1382.             endif
  1383.         endif
  1384.         ifint $(NewNumDialin) == 0
  1385.             set RasStartValue = 3
  1386.         endif
  1387.         Debug-Output "OEMNSVRA.INF: Setting RemoteAccess start type to "$(RasStartValue)
  1388.         SetRegValue $(KeySvr) {Start,$(NoTitle),$(!REG_VT_DWORD),$(RasStartValue)}
  1389.         CloseRegKey $(KeySvr)
  1390.     endif
  1391.     OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) $(!MAXIMUM_ALLOWED) KeySrvParams
  1392.     ifstr $(KeySrvParams) == $(KeyNull)
  1393.        Debug-Output "OEMNSVRA.INF: could not open RasSvr Params key"
  1394.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1395.        goto fatalregistry
  1396.     endif
  1397.     set NewValueList = +
  1398.         {{NetBiosGatewayEnabled, $(NoTitle), $(!REG_VT_DWORD), $(NetBiosGtwyEnabled)}}
  1399.     Shell  $(UtilityInf), AddValueList, $(KeySrvParams), $(NewValueList)
  1400.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1401.          Debug-Output "AddValueList bombed out"
  1402.          goto ShellCodeError
  1403.     endif
  1404.     set RegistryErrorIndex = $($R0)
  1405.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1406.         goto fatalregistry
  1407.     endif
  1408.     CloseRegKey $(KeySrvParams)
  1409. WriteRasMan = +
  1410.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamKeyName) $(!MAXIMUM_ALLOWED) KeyRasManParams
  1411.     ifstr $(KeyRasManParams) == $(KeyNull)
  1412.        Debug-Output "OEMNSVRA.INF: could not open RasMan Params key"
  1413.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1414.        goto fatalregistry
  1415.     endif
  1416.     set MediaValue = {}
  1417.     ifstr(i) $(fSerialInstalled) == TRUE
  1418.         set MediaValue = {"rasser", "rastapi"}
  1419.     else
  1420.         set MediaValue = {"rastapi"}
  1421.     endif
  1422.     set OtherConfigKey = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\"$(ProductRASName)"\OTHER DEVICES\CONFIGURED"
  1423.     set KeyOtherMedia = $(KeyNull)
  1424.     OpenRegKey $(!REG_H_LOCAL) "" $(OtherConfigKey) $(!MAXIMUM_ALLOWED)  +
  1425.                KeyOtherMedia
  1426.     ifstr $(KeyOtherMedia) != $(KeyNull)
  1427.         EnumRegKey $(KeyOtherMedia) OtherList
  1428.         Debug-Output "oemnsvra.inf: Other Media list "$(OtherList)
  1429.         ForListDo $(OtherList)
  1430.             set MediaName = *($($),1)
  1431.             set KeyMedia = $(KeyNull)
  1432.             OpenRegKey $(KeyOtherMedia) "" $(MediaName) $(!MAXIMUM_ALLOWED)  +
  1433.                        KeyMedia
  1434.             ifstr $(KeyMedia) != $(KeyNull)
  1435.                 GetRegValue $(KeyMedia), "MediaType" MediaType
  1436.                 Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  1437.                     set MediaTypeValue = *($(MediaType),4)
  1438.                     set MediaValue = >($(MediaValue), $(MediaTypeValue))
  1439.                 endif
  1440.                 CloseRegKey $(KeyMedia)
  1441.             endif
  1442.         EndForListDo
  1443.         CloseRegKey $(KeyOtherMedia)
  1444.     else
  1445.         Debug-Output "oemnsvra.inf: Other Media not configured"
  1446.     endif
  1447.     Debug-Output "Adding Medias as "$(MediaValue)
  1448.     set NewValueList = {{Medias,$(NoTitle),$(!REG_VT_MULTI_SZ),$(MediaValue)}}
  1449.     Shell  $(UtilityInf), AddValueList, $(KeyRasManParams), $(NewValueList)
  1450.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1451.          Debug-Output "AddValueList bombed out"
  1452.          goto ShellCodeError
  1453.     endif
  1454.     set RegistryErrorIndex = $($R0)
  1455.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1456.         goto fatalregistry
  1457.     endif
  1458.     CloseRegKey $(KeyRasManParams)
  1459. WriteNdisWan = +
  1460.     set PrevNumPorts = 0
  1461.     set PrevNumDialin = 0
  1462.     set PrevNumDialout = 0
  1463.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1464.     ifstr $(KeyMacParams) == $(KeyNull)
  1465.        ifstr(i) $(!NTN_InstallMode) == configure
  1466.           Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1467.           set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1468.           goto fatalregistry
  1469.        endif
  1470.        goto WriteNdisWan1
  1471.     endif
  1472.     GetRegValue $(KeyMacParams), "Ports" PortsInfo
  1473.     GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  1474.     GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  1475.     GetRegValue $(KeyMacParams), "DialinIP" DialinIPInfo
  1476.     GetRegValue $(KeyMacParams), "DialoutIP" DialoutIPInfo
  1477.     GetRegValue $(KeyMacParams), "DialinoutIPX" DialinoutIPXInfo
  1478.     set PrevNumPorts         = *($(PortsInfo), 4)
  1479.     set PrevNumDialinNBF     = *($(DialinNBFInfo), 4)
  1480.     set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  1481.     set PrevNumDialinIP      = *($(DialinIPInfo), 4)
  1482.     set PrevNumDialoutIP     = *($(DialoutIPInfo), 4)
  1483.     set PrevNumDialinoutIPX  = *($(DialinoutIPXInfo), 4)
  1484.     Debug-Output "Ports currently configured "$(PrevNumPorts)
  1485.     Debug-Output "Ports currently dialin NBF "$(PrevNumDialinNBF)
  1486.     Debug-Output "Ports currently dialout NBF "$(PrevNumDialoutNBF)
  1487.     Debug-Output "Ports currently dialin IP "$(PrevNumDialinIP)
  1488.     Debug-Output "Ports currently diaout IP "$(PrevNumDialoutIP)
  1489.     Debug-Output "Ports currently diainout IPX "$(PrevNumDialinoutIPX)
  1490.     CloseRegKey $(KeyMacParams)
  1491. WriteNdisWan1 =+
  1492.     set ThisOption = NDISWAN
  1493.     set RasSpecificString = $(!Product$(ThisOption)Name)
  1494.     ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1495.       ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1496.         ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1497.           ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1498.             ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1499.               set CommonStatus = STATUS_NO_EFFECT
  1500.               goto WriteRasAsyMac
  1501.             endif
  1502.           endif
  1503.         endif
  1504.       endif
  1505.     endif
  1506.     set NumAddDialinNBF      = 0
  1507.     set NumAddDialoutNBF     = 0
  1508.     set NumRemoveDialinNBF   = 0
  1509.     set NumRemoveDialoutNBF  = 0
  1510.     set NumAddDialinIP       = 0
  1511.     set NumAddDialoutIP      = 0
  1512.     set NumRemoveDialinIP    = 0
  1513.     set NumRemoveDialoutIP   = 0
  1514.     ifint $(PrevNumDialinNBF) > $(NewNumDialinNBF)
  1515.         set-sub NumRemoveDialinNBF = $(PrevNumDialinNBF), $(NewNumDialinNBF)
  1516.     else
  1517.         set-sub NumAddDialinNBF = $(NewNumDialinNBF), $(PrevNumDialinNBF)
  1518.     endif
  1519.     ifint $(PrevNumDialoutNBF) > $(NewNumDialoutNBF)
  1520.         set-sub NumRemoveDialoutNBF = $(PrevNumDialoutNBF), $(NewNumDialoutNBF)
  1521.     else
  1522.         set-sub NumAddDialoutNBF = $(NewNumDialoutNBF), $(PrevNumDialoutNBF)
  1523.     endif
  1524.     ifint $(PrevNumDialinIP) > $(NewNumDialinIP)
  1525.         set-sub NumRemoveDialinIP = $(PrevNumDialinIP), $(NewNumDialinIP)
  1526.     else
  1527.         set-sub NumAddDialinIP = $(NewNumDialinIP), $(PrevNumDialinIP)
  1528.     endif
  1529.     ifint $(PrevNumDialoutIP) > $(NewNumDialoutIP)
  1530.         set-sub NumRemoveDialoutIP = $(PrevNumDialoutIP), $(NewNumDialoutIP)
  1531.     else
  1532.         set-sub NumAddDialoutIP = $(NewNumDialoutIP), $(PrevNumDialoutIP)
  1533.     endif
  1534.     ifint $(PrevNumDialinoutIPX) > $(NewNumDialinoutIPX)
  1535.         set-sub NumRemoveDialinoutIPX = $(PrevNumDialinoutIPX), $(NewNumDialinoutIPX)
  1536.     else
  1537.         set-sub NumAddDialinoutIPX = $(NewNumDialinoutIPX), $(PrevNumDialinoutIPX)
  1538.     endif
  1539.     set NumAddTotal = 0
  1540.     set NumRemoveTotal = 0
  1541.     set-add NumAddTotal = $(NumAddDialinNBF), $(NumAddDialoutNBF)
  1542.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinIP)
  1543.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialoutIP)
  1544.     set-add NumAddTotal = $(NumAddTotal), $(NumAddDialinoutIPX)
  1545.     set-add NumRemoveTotal = $(NumRemoveDialinNBF), $(NumRemoveDialoutNBF)
  1546.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinIP)
  1547.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialoutIP)
  1548.     set-add NumRemoveTotal = $(NumRemoveTotal), $(NumRemoveDialinoutIPX)
  1549.     Debug-Output "NumAddDialinNBF = "$(NumAddDialinNBF)
  1550.     Debug-Output "NumAddDialoutNBF = "$(NumAddDialoutNBF)
  1551.     Debug-Output "NumAddDialinIP = "$(NumAddDialinIP)
  1552.     Debug-Output "NumAddDialoutIP = "$(NumAddDialoutIP)
  1553.     Debug-Output "NumAddDialinoutIPX = "$(NumAddDialinoutIPX)
  1554.     Debug-Output "NumAddTotal = "$(NumAddTotal)
  1555.     Debug-Output "NumRemoveDialinNBF = "$(NumRemoveDialinNBF)
  1556.     Debug-Output "NumRemoveDialinIP = "$(NumRemoveDialinIP)
  1557.     Debug-Output "NumRemoveDialinoutIPX = "$(NumRemoveDialinoutIPX)
  1558.     Debug-Output "NumRemoveTotal = "$(NumRemoveTotal)
  1559.     Shell "utility.inf" BaseServiceKey
  1560.     set RegistryErrorIndex = $($R0)
  1561.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1562.         Debug-Output "OEMNSVRA.INF: Opened the services base key"
  1563.         set ServicesBaseKey = $($R1)
  1564.     else
  1565.         set ServicesBaseKey = $(KeyNull)
  1566.     endif
  1567.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(MAXIMUM_ALLOWED) KeyNetcards
  1568.     Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  1569.         Debug-Output "OEMNSVRA.INF: Opened the networkcardkey "
  1570.     endif
  1571.     set RasAdapterNumber = 1
  1572. AddNdisWanNetCard = +
  1573.      IfInt $(NumAddTotal) == 0
  1574.       goto RemoveNdisWanNetCard
  1575.      else
  1576.           Debug-Output "In the Add if loop. NumAddTotal = "$(NumAddTotal)
  1577.           shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1578.                                       $(WritingRasParamsAdd)" "$(NumAddTotal)
  1579.           set-sub NumAddTotal = $(NumAddTotal),1
  1580.           Shell $(UtilityInf), AddHardwareComponent, +
  1581.                $(!Product$(ThisOption)Name),$(ProductInfName),+
  1582.                $(!Product$(ThisOption)KeyName), +
  1583.                $(ServicesBaseKey), $(KeyNetcards), $(RasAdapterNumber)
  1584.           ifint $($R4) != -1
  1585.              Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  1586.                                   {$(!Product$(ThisOption)Name),+
  1587.                                   $(!NetworkCardKeyName)"\"$($R4)})
  1588.              set RasAdapterNumber = $($R4)
  1589.           endif
  1590.           ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1591.              Debug-Output "Cannot add hardware component"
  1592.              goto ShellCodeError
  1593.           endif
  1594.           set RegistryErrorIndex = $($R0)
  1595.           Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1596.               EndWait
  1597.               Debug-Output "Registry error: add hardware component"
  1598.               CloseRegKey $($R1)
  1599.               CloseRegKey $($R2)
  1600.               CloseRegKey $($R3)
  1601.               goto fatalregistry
  1602.           endif
  1603.         set KeyNetcard    = $($R1)
  1604.         set KeyParameters = $($R3)
  1605.         set KeyAdapterRules = $($R2)
  1606.         set AdapterNumber = $($R4)
  1607.         set NetcardInfoList = +
  1608.             {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  1609.              {Title,$(NoTitle),$(!REG_VT_SZ),+
  1610.               "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  1611.              {Description,$(NoTitle),$(!REG_VT_SZ),+
  1612.               $(!Product$(ThisOption)Description)},+
  1613.              {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  1614.              {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  1615.              {Hidden,$(NoTitle),$(!REG_VT_DWORD),$(HideComponent)}}
  1616.         Shell $(UtilityInf), GetBusTypeNum
  1617.         set BusTypeNum = $($R1)
  1618.         ifint $(NumAddDialinNBF) > 0
  1619.             set-sub NumAddDialinNBF = $(NumAddDialinNBF), 1
  1620.             set NetcardInfoList = >($(NetcardInfoList), +
  1621.                                    {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1622.                                     $(!Product$(ThisOption)DIALINName)})
  1623.             set ServiceParamList = +
  1624.                         {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1625.                         {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1626.             set AdapterType = $(!NetRuleHardwareDIALINType)
  1627.             set AdapterClass = $(!NetRuleHardwareDIALINClass)
  1628.             set AdapterBlock = $(!NetRuleHardwareDIALINBlock)
  1629.         else-ifint $(NumAddDialoutNBF) > 0
  1630.             set-sub NumAddDialoutNBF = $(NumAddDialoutNBF), 1
  1631.             set NetcardInfoList = >($(NetcardInfoList), +
  1632.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1633.                                   $(!Product$(ThisOption)DIALOUTName)})
  1634.             set ServiceParamList = +
  1635.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1636.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1637.             set AdapterType = $(!NetRuleHardwareDIALOUTType)
  1638.             set AdapterClass = $(!NetRuleHardwareDIALOUTClass)
  1639.             set AdapterBlock = $(!NetRuleHardwareDIALOUTBlock)
  1640.         else-ifint $(NumAddDialinIP) > 0
  1641.             set-sub NumAddDialinIP = $(NumAddDialinIP), 1
  1642.             set NetcardInfoList = >($(NetcardInfoList), +
  1643.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1644.                                   $(!Product$(ThisOption)DIALINIPName)})
  1645.             set ServiceParamList = +
  1646.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1647.                          {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1648.                          {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),1},+
  1649.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1650.             set AdapterType = $(!NetRuleHardwareDIALINIPType)
  1651.             set AdapterClass = $(!NetRuleHardwareDIALINIPClass)
  1652.             set AdapterBlock = $(!NetRuleHardwareDIALINIPBlock)
  1653.         else-ifint $(NumAddDialoutIP) > 0
  1654.             set-sub NumAddDialoutIP = $(NumAddDialoutIP), 1
  1655.             set NetcardInfoList = >($(NetcardInfoList), +
  1656.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1657.                                   $(!Product$(ThisOption)DIALOUTIPName)})
  1658.             set ServiceParamList = +
  1659.                        {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),1},+
  1660.                        {AutoIPAddress,$(NoTitle),$(!REG_VT_DWORD),1},+
  1661.                        {ServerAdapter,$(NoTitle),$(!REG_VT_DWORD),0},+
  1662.                        {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1663.             set AdapterType = $(!NetRuleHardwareDIALOUTIPType)
  1664.             set AdapterClass = $(!NetRuleHardwareDIALOUTIPClass)
  1665.             set AdapterBlock = $(!NetRuleHardwareDIALOUTIPBlock)
  1666.         else-ifint $(NumAddDialinoutIPX) > 0
  1667.             set-sub NumAddDialinoutIPX = $(NumAddDialinoutIPX), 1
  1668.             set NetcardInfoList = >($(NetcardInfoList), +
  1669.                                  {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  1670.                                   $(!Product$(ThisOption)DIALINOUTIPXName)})
  1671.             set ServiceParamList = +
  1672.                          {{EnumExportPref,$(NoTitle),$(!REG_VT_DWORD),0},+
  1673.                          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1674.             set AdapterType = $(!NetRuleHardwareDIALINOUTIPXType)
  1675.             set AdapterClass = $(!NetRuleHardwareDIALINOUTIPXClass)
  1676.             set AdapterBlock = $(!NetRuleHardwareDIALINOUTIPXBlock)
  1677.         endif
  1678.         Shell  $(UtilityInf), AddValueList, $(KeyNetcard), $(NetcardInfoList)
  1679.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1680.             Debug-Output "ShellCode error"
  1681.             goto ShellCodeError
  1682.         endif
  1683.         CloseRegKey $(KeyNetcard)
  1684.         set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  1685.         set TempBindForm = $(TempProdName)$(!NetRuleHardware$(ThisOption)BindForm)
  1686.         set AdapterRulesList = +
  1687.             {{type,$(NoTitle),$(!REG_VT_SZ),+
  1688.               $(AdapterType)},+
  1689.              {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)},+
  1690.              {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1691.               $(AdapterClass)},+
  1692.              {block,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  1693.               $(AdapterBlock)},+
  1694.              {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)},+
  1695.              {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  1696.         Shell  $(UtilityInf), AddValueList, $(KeyAdapterRules), $(AdapterRulesList)
  1697.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1698.             Debug-Output "ShellCode error."
  1699.             goto ShellCodeError
  1700.         endif
  1701.         set RegistryErrorIndex = $($R0)
  1702.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  1703.             EndWait
  1704.             Debug-Output "Resgitry error: add value list."
  1705.             CloseRegKey $(KeyParameters)
  1706.             CloseRegKey $(KeyAdapterRules)
  1707.             goto fatalregistry
  1708.         endif
  1709.         CloseRegKey $(KeyAdapterRules)
  1710.         Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(ServiceParamList)
  1711.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1712.             Debug-Output "ShellCode error."
  1713.             goto ShellCodeError
  1714.         endif
  1715.         CloseRegKey $(KeyParameters)
  1716.     goto AddNdisWanNetCard
  1717.      endif 
  1718. RemoveNdisWanNetCard = +
  1719.      ifstr(i) $(ServicesBaseKey) != $(KeyNull)
  1720.          CloseRegKey $(ServicesBaseKey)
  1721.      endif
  1722.      ifstr(i) $(KeyNetcards) != $(KeyNull)
  1723.          CloseRegKey $(KeyNetcards)
  1724.      endif
  1725.      Ifint $(NumRemoveTotal) == 0
  1726.      goto WriteNdisWanEnd
  1727.      endif
  1728.      Debug-Output "Removing NdisWan netcard entry..."
  1729.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  1730.         ifstr $(KeyNetcards) == $(KeyNull)
  1731.              Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  1732.              set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1733.              goto fatalregistry
  1734.         endif
  1735.         EnumRegKey $(KeyNetcards) NetcardsList
  1736.         set RemoveDialinList  = {}
  1737.         set RemoveDialinIpList  = {}
  1738.         set RemoveDialoutList = {}
  1739.         set RemoveDialoutIpList = {}
  1740.         set RemoveDialinoutIpxList = {}
  1741.         ForListDo $(NetcardsList)
  1742.            set KeyName = *($($),1)
  1743.            OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  1744.            ifstr $(Card) == $(KeyNull)
  1745.                Debug-Output "OEMNSVRA.INF: could not open netcard key"
  1746.                set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1747.                goto fatalregistry
  1748.            endif
  1749.            GetRegValue $(Card), "ProductName" ProductNameInfo
  1750.            set CardProductName = *($(ProductNameInfo), 4)
  1751.            ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  1752.               set RemoveDialinList = >($(RemoveDialinList), +
  1753.                       {$(!ProductNDISWANName),+
  1754.                                        $(!NetworkCardKeyName)"\"$(KeyName)})
  1755.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  1756.               set RemoveDialinIpList = >($(RemoveDialinIpList), +
  1757.                     {$(!ProductNDISWANName),+
  1758.                                          $(!NetworkCardKeyName)"\"$(KeyName)})
  1759.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  1760.               set RemoveDialoutList = >($(RemoveDialoutList), +
  1761.                        {$(!ProductNDISWANName),+
  1762.                                         $(!NetworkCardKeyName)"\"$(KeyName)})
  1763.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  1764.               set RemoveDialoutIpList = >($(RemoveDialoutIpList), +
  1765.                      {$(!ProductNDISWANName),+
  1766.                                           $(!NetworkCardKeyName)"\"$(KeyName)})
  1767.            else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  1768.               set RemoveDialinoutIpxList = >($(RemoveDialinoutIpxList), +
  1769.                        {$(!ProductNDISWANName),+
  1770.                                            $(!NetworkCardKeyName)"\"$(KeyName)})
  1771.            endif
  1772.            CloseRegKey $(Card)
  1773.         EndForListDo
  1774.         CloseRegKey $(KeyNetcards)
  1775.         QueryListSize IpNetCards $(RemoveDialinIpList)
  1776.         ifint $(IpNetCards) != 0
  1777.             ForListDo  $(RemoveDialinIpList)
  1778.                 ifint $(NumRemoveDialinIP) == 0
  1779.                     goto RemoveDialinIPX
  1780.                 endif
  1781.                 set-sub NumRemoveDialinIP = $(NumRemoveDialinIP), 1
  1782.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1783.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1784.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1785.                 debug-output "Removing hardware component: "$($)
  1786.                 Shell $(UtilityInf), RemoveHardwareComponent, +
  1787.                                      $(Manufacturer), *($($),1), *($($),2)
  1788.             EndForListDo
  1789.         endif
  1790. RemoveDialinIPX =+
  1791.         QueryListSize IpxNetCards $(RemoveDialinoutIpxList)
  1792.         ifint $(IpxNetCards) != 0
  1793.             ForListDo  $(RemoveDialinoutIpxList)
  1794.                 ifint $(NumRemoveDialinoutIPX) == 0
  1795.                     goto RemoveDialinNBF
  1796.                 endif
  1797.                 set-sub NumRemoveDialinoutIPX = $(NumRemoveDialinoutIPX), 1
  1798.                 debug-output "Removing hardware component: "$($)
  1799.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1800.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1801.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1802.                 Shell $(UtilityInf), RemoveHardwareComponent, +
  1803.                                      $(Manufacturer), *($($),1), *($($),2)
  1804.             EndForListDo
  1805.         endif
  1806. RemoveDialinNBF =+
  1807.         ForListDo  $(RemoveDialinList)
  1808.             ifint $(NumRemoveDialinNBF) == 0
  1809.                 goto RemoveDialout
  1810.             endif
  1811.             set-sub NumRemoveDialinNBF = $(NumRemoveDialinNBF), 1
  1812.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1813.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1814.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1815.             debug-output "Removing hardware component: "$($)
  1816.             Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer),+
  1817.                   *($($),1), *($($),2)
  1818.         EndForListDo
  1819. RemoveDialout = +
  1820.         QueryListSize IpNetCards $(RemoveDialoutIpList)
  1821.         ifint $(IpNetCards) != 0
  1822.             ForListDo  $(RemoveDialoutIpList)
  1823.                 ifint $(NumRemoveDialoutIP) == 0
  1824.                     goto RemoveDialoutNBF
  1825.                 endif
  1826.                 set-sub NumRemoveDialoutIP = $(NumRemoveDialoutIP), 1
  1827.                 shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1828.                                       $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1829.                 set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1830.                 debug-output "Removing hardware component: "$($)
  1831.                 Shell $(UtilityInf), RemoveHardwareComponent, +
  1832.                                      $(Manufacturer), *($($),1), *($($),2)
  1833.             EndForListDo
  1834.         endif
  1835. RemoveDialoutNBF =+
  1836.         ForListDo  $(RemoveDialoutList)
  1837.             ifint $(NumRemoveDialoutNBF) == 0
  1838.         goto WriteNdisWanEnd
  1839.             endif
  1840.             set-sub NumRemoveDialoutNBF = $(NumRemoveDialoutNBF), 1
  1841.             shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  1842.                                   $(WritingRasParamsRemove)" "$(NumRemoveTotal)
  1843.             set-sub NumRemoveTotal = $(NumRemoveTotal), 1
  1844.             debug-output "Removing hardware component: "$($)
  1845.             Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer),+
  1846.                   *($($),1), *($($),2)
  1847.         EndForListDo
  1848. WriteNdisWanEnd = +
  1849.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) KeyHubParams
  1850.     ifstr $(KeyHubParams) == $(KeyNull)
  1851.        Debug-Output "OEMNSVRA.INF: could not open NdisWan Params key"
  1852.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1853.        goto fatalregistry
  1854.     endif
  1855.     set NewValueList = +
  1856.         {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NewNumPortsList)}}
  1857.     Shell  $(UtilityInf), AddValueList, $(KeyHubParams), $(NewValueList)
  1858.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1859.          Debug-Output "AddValueList bombed out"
  1860.          goto ShellCodeError
  1861.     endif
  1862.     set RegistryErrorIndex = $($R0)
  1863.     CloseRegKey $(KeyHubParams)
  1864.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1865.         goto fatalregistry
  1866.     endif
  1867. WriteRasAsyMac = +
  1868.     ifstr(i) $(fSerialInstalled) == TRUE
  1869.         set AsyStartValue = 2
  1870.     else-ifstr(i) $(fOtherInstalled) == TRUE
  1871.         set AsyStartValue = 2
  1872.     else
  1873.         set AsyStartValue = 4
  1874.     endif
  1875.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  1876.     ifstr $(KeyMac) == $(KeyNull)
  1877.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  1878.     else
  1879.         SetRegValue $(KeyMac) {Start,$(NoTitle),$(!REG_VT_DWORD),$(AsyStartValue)}
  1880.         CloseRegKey $(KeyMac)
  1881.     endif
  1882.     ifint $(PrevNumDialinNBF) == $(NewNumDialinNBF)
  1883.       ifint $(PrevNumDialoutNBF) == $(NewNumDialoutNBF)
  1884.         ifint $(PrevNumDialinIP) == $(NewNumDialinIP)
  1885.           ifint $(PrevNumDialoutIP) == $(NewNumDialoutIP)
  1886.             ifint $(PrevNumDialinoutIPX) == $(NewNumDialinoutIPX)
  1887.                 EndWait
  1888.                 Ifint $(BillboardVisible) != 0
  1889.                     Shell "subroutn.inf" PopBillboard
  1890.                     Set BillboardVisible = 0
  1891.                 Endif
  1892.                 goto WriteProtocolInfo
  1893.             endif
  1894.           endif
  1895.         endif
  1896.       endif
  1897.     endif
  1898.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  1899.     ifstr $(KeyMacParams) == $(KeyNull)
  1900.        Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  1901.        set RegistryErrorIndex = UNABLE_OPEN_SERVICE_PARAMETERS
  1902.        goto fatalregistry
  1903.     endif
  1904.     set NewValueList = +
  1905.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)},+
  1906.          {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinNBF)},+
  1907.          {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutNBF)},+
  1908.          {DialinIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinIP)},+
  1909.          {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialoutIP)},+
  1910.          {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), $(NewNumDialinoutIPX)}}
  1911.     Shell  $(UtilityInf), AddValueList, $(KeyMacParams), $(NewValueList)
  1912.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1913.          Debug-Output "AddValueList bombed out"
  1914.          goto ShellCodeError
  1915.     endif
  1916.     set RegistryErrorIndex = $($R0)
  1917.     CloseRegKey $(KeyMacParams)
  1918.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1919.         goto fatalregistry
  1920.     endif
  1921.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  1922.     ifstr $(KeyNetcards) == $(KeyNull)
  1923.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  1924.          set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1925.          goto fatalregistry
  1926.     endif
  1927.     EnumRegKey $(KeyNetcards) NetcardsList
  1928.     ForListDo $(NetcardsList)
  1929.        set KeyName = *($($),1)
  1930.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  1931.        ifstr $(Card) == $(KeyNull)
  1932.           Debug-Output "OEMNSVRA.INF: could not open netcard key"
  1933.           set RegistryErrorIndex = UNABLE_OPEN_NETWORKCARD_SECTION
  1934.           goto fatalregistry
  1935.        endif
  1936.        GetRegValue $(Card), "ProductName" ProductNameInfo
  1937.        set CardProductName = *($(ProductNameInfo), 4)
  1938.        ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  1939.            goto RasMacCardFound
  1940.        endif
  1941.        CloseRegKey $(Card)
  1942.     EndForListDo
  1943.     CloseRegKey $(KeyNetcards)
  1944. RasMacCardFound = +
  1945.     Debug-Output "Shelling to find AsyncMac Service."
  1946.     Shell $(UtilityInf) FindService, $(Card)
  1947.     CloseRegKey $(Card)
  1948.     ifint $($ShellCode)  != $(!SHELL_CODE_OK)
  1949.         Debug-Output "OEMNSVRA.INF: shell Findservice failed"
  1950.         goto ShellCodeError
  1951.     endif
  1952.     ifstr(i) $($R0) != NO_ERROR
  1953.         Debug-Output "OEMNSVRA.INF: findservice failed."
  1954.         goto fatalregistry
  1955.     endif
  1956.     set KeyParameters = $($R2)
  1957.     CloseRegKey $($R1)
  1958.     Shell $(UtilityInf), GetBusTypeNum
  1959.     set BusTypeNum = $($R1)
  1960.     set NewValueList = +
  1961.         {{Ports, $(NoTitle), $(!REG_VT_DWORD), $(NewNumPorts)}, +
  1962.          {BusType, $(NoTitle), $(!REG_VT_DWORD), $(BusTypeNum)}}
  1963.     Shell  $(UtilityInf), AddValueList, $(KeyParameters), $(NewValueList)
  1964.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1965.          Debug-Output "AddValueList bombed out"
  1966.          goto ShellCodeError
  1967.     endif
  1968.     set RegistryErrorIndex = $($R0)
  1969.     CloseRegKey $(KeyParameters)
  1970.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  1971.         goto fatalregistry
  1972.     endif
  1973.     Ifstr(i) $(!NTN_InstallPhase) != primary
  1974.         shell $(subroutninf) PopBillBoard
  1975.         Set BillboardVisible = 0
  1976.     Endif
  1977. WriteProtocolInfo =+
  1978.     Shell "" SaveSelectedProtocols $(fNetbeuiSelected) $(fTcpIpSelected) +
  1979.                                    $(fIpxSelected) $(fNetbeuiAllowed) +
  1980.                                    $(fTcpIpAllowed) $(fIpxAllowed)
  1981.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1982.          Debug-Output "Error shelling SaveSelectedProtocols"
  1983.          goto ShellCodeError
  1984.     endif
  1985.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1986.          Debug-Output "Error Saving selected protocols"
  1987.          goto end
  1988.     endif
  1989.     Shell "" WritePPPParameters
  1990.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  1991.          Debug-Output "Error shelling WritePPPParameters"
  1992.          goto ShellCodeError
  1993.     endif
  1994.     ifstr(i) $($R0) != STATUS_SUCCESSFUL
  1995.          Debug-Output "Error from WritePPPParameters"
  1996.          goto end
  1997.     endif
  1998.     ifstr(i) $(fNetbeuiChosen) == TRUE
  1999.         ifstr(i) $(fNetbeuiInstalled) == FALSE
  2000.             Shell "" InstallProtocol "NETBEUI"
  2001.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2002.                  Debug-Output "Error shelling InstallProtocol NETBEUI"
  2003.                  goto ShellCodeError
  2004.             endif
  2005.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2006.                  Debug-Output "Error installing NETBEUI"
  2007.                  goto end
  2008.             endif
  2009.         endif
  2010.     endif
  2011.     ifstr(i) $(fTcpIpChosen) == TRUE
  2012.         ifstr(i) $(fTcpIpInstalled) == FALSE
  2013.             Shell "" InstallProtocol "TCPIP"
  2014.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2015.                  Debug-Output "Error shelling InstallProtocol TCPIP"
  2016.                  goto ShellCodeError
  2017.             endif
  2018.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2019.                  Debug-Output "Error installing TCPIP"
  2020.                  goto end
  2021.             endif
  2022.         endif
  2023.         Shell "" InstallRasArpService
  2024.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2025.              Debug-Output "Error shelling InstallRasArpService"
  2026.              goto ShellCodeError
  2027.         endif
  2028.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2029.              Debug-Output "Error from InstallRasArpService"
  2030.              goto end
  2031.         endif
  2032.         set CommonStatus = STATUS_SUCCESSFUL
  2033.         Shell "" UpdateIPRouterInfo $(EnableIpRouter)
  2034.         Shell "" SaveTcpipInfo
  2035.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2036.              Debug-Output "Error shelling SaveTcpipInfo"
  2037.              goto ShellCodeError
  2038.         endif
  2039.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2040.              Debug-Output "Error saving Tcpip info"
  2041.              goto end
  2042.         endif
  2043.     else
  2044.         Shell "" RemoveRasArpService
  2045.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2046.              Debug-Output "Error shelling RemoveRasArpService"
  2047.              goto ShellCodeError
  2048.         endif
  2049.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2050.              Debug-Output "Error from RemoveRasArpService"
  2051.              goto end
  2052.         endif
  2053.         set CommonStatus = STATUS_SUCCESSFUL
  2054.     endif
  2055.     ifstr(i) $(fIpxChosen) == TRUE
  2056.         ifstr(i) $(fIpxInstalled) == FALSE
  2057.             Shell "" InstallProtocol "IPX"
  2058.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2059.                  Debug-Output "Error shelling InstallProtocol IPX"
  2060.                  goto ShellCodeError
  2061.             endif
  2062.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2063.                  Debug-Output "Error installing IPX"
  2064.                  goto end
  2065.             endif
  2066.         endif
  2067.         OpenRegKey $(!REG_H_LOCAL) ""  +
  2068.                    $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  2069.                    $(!MAXIMUM_ALLOWED) KeyIpxParameters
  2070.         ifstr $(KeyIpxParameters) != $(KeyNull)
  2071.            GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  2072.                        SingleNetworkActive
  2073.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2074.                SetRegValue $(KeyIpxParameters) +
  2075.                            {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  2076.            endif
  2077.            GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  2078.                        DisableDialoutSap
  2079.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2080.                SetRegValue $(KeyIpxParameters) +
  2081.                            {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  2082.            endif
  2083.            GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  2084.                        DisableDialinNetbios
  2085.            ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2086.                SetRegValue $(KeyIpxParameters) +
  2087.                            {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  2088.            endif
  2089.            CloseRegKey $(KeyIpxParameters)
  2090.         Endif
  2091.         else
  2092.             Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  2093.         endif
  2094.         Shell "" SaveIpxInfo $(EnableIpxRouter)
  2095.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2096.              Debug-Output "Error shelling SaveIpxInfo"
  2097.              goto ShellCodeError
  2098.         endif
  2099.         ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2100.              Debug-Output "Error saving Ipx info"
  2101.              goto end
  2102.         endif
  2103.         ifint $(EnableIpxRouter) == 1
  2104.             Shell "" InstallNwlnkRipService
  2105.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2106.                  Debug-Output "Error shelling InstallNwlnkRipService"
  2107.                  goto ShellCodeError
  2108.             endif
  2109.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2110.                  Debug-Output "Error from InstallNwlnkRipService"
  2111.                  goto end
  2112.             endif
  2113.             set CommonStatus = STATUS_SUCCESSFUL
  2114.             Shell "" InstallIsnSapService
  2115.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2116.                  Debug-Output "Error shelling InstallIsnSapService"
  2117.                  goto ShellCodeError
  2118.             endif
  2119.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2120.                  Debug-Output "Error from InstallIsnSapService"
  2121.                  goto end
  2122.             endif
  2123.             set CommonStatus = STATUS_SUCCESSFUL
  2124.         else
  2125.             Shell "" RemoveServiceDependency "RemoteAccess" +
  2126.                                                       $(!ProductRASISNRIPName)
  2127.             Shell "" RemoveServiceDependency "RemoteAccess" +
  2128.                                                       $(!ProductRASISNSAPName)
  2129.         endif
  2130.         Shell "" UpdateIPXRouterInfo $(EnableWanRouter)
  2131.     endif
  2132. WriteParametersOver = +
  2133.     EndWait
  2134.     goto successful
  2135. RemoveRas = +
  2136.     StartWait
  2137.     set REMOVE_SOFTWARE = {}
  2138.     shell "" QueryComponentsInstalled
  2139.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2140.         Set InstalledComps = $($R1)
  2141.         Set InstalledFlags = $($R2)
  2142.         Set DoServer      = *($(InstalledFlags),1)
  2143.         Set DoClient      = *($(InstalledFlags),2)
  2144.         Set DoAdmin       = *($(InstalledFlags),3)
  2145.         Set DoServerOnly  = *($(InstalledFlags),4)
  2146.         Set DoClientOnly  = *($(InstalledFlags),5)
  2147.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2148.     Endif
  2149.     Debug-Output "Installed List is "$(InstalledComps)
  2150.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2151.     ifstr(i) $(DoAdminOnly) == TRUE
  2152.          set REMOVE_SOFTWARE = {$(ProductRASName)}
  2153.          goto RemoveSoftware
  2154.     endif
  2155.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASName))
  2156.     ifstr(i) $(DoServer) == TRUE
  2157.          set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASSVRName))
  2158.     endif
  2159.     set REMOVE_SOFTWARE = >($(REMOVE_SOFTWARE), $(ProductRASMANName))
  2160.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  2161.     ifstr $(KeyNetcards) == $(KeyNull)
  2162.          Debug-Output "OEMNSVRA.INF: could not open Netcards key"
  2163.          goto RemoveSoftware
  2164.     endif
  2165.     EnumRegKey $(KeyNetcards) NetcardsList
  2166.     ForListDo $(NetcardsList)
  2167.        set KeyName = *($($),1)
  2168.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2169.        ifstr $(Card) == $(KeyNull)
  2170.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  2171.            goto RemoveSoftware
  2172.        endif
  2173.        GetRegValue $(Card), "ProductName" ProductNameInfo
  2174.        set CardProductName = *($(ProductNameInfo), 4)
  2175.        ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2176.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2177.                 {$(!ProductNDISWANName),+
  2178.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2179.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2180.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2181.                 {$(!ProductNDISWANName),+
  2182.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2183.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2184.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2185.                 {$(!ProductNDISWANName),+
  2186.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2187.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2188.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2189.                 {$(!ProductNDISWANName),+
  2190.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2191.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2192.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2193.                 {$(!ProductNDISWANName),+
  2194.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2195.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2196.           set !NETCARD_LIST = >($(!NETCARD_LIST), +
  2197.                 {$(!ProductNDISWANName),+
  2198.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2199.        else-ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2200.           set !NETCARD_LIST = >($(!NETCARD_LIST),+
  2201.                                 {$(ProductRASASYMACName),+
  2202.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  2203.        endif
  2204.        CloseRegKey $(Card)
  2205.     EndForListDo
  2206.     CloseRegKey $(KeyNetcards)
  2207.     read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2208.     QueryListSize NumRemove $(!NETCARD_LIST)
  2209.     ForListDo  $(!NETCARD_LIST)
  2210.         shell $(subroutninf) PushBillBoard NETSTATUSDLG +
  2211.                               $(RemovingAdapters)" "$(NumRemove)
  2212.         Set BillboardVisible = 1
  2213.         debug-output "Removing hardware component: "$($)
  2214.         Shell $(UtilityInf), RemoveHardwareComponent, $(Manufacturer),+
  2215.               *($($),1), *($($),2)
  2216.         set-sub NumRemove = $(NumRemove), 1
  2217.     EndForListDo
  2218.     ifint $(BillboardVisible) != 0
  2219.         Shell "subroutn.inf" PopBillboard
  2220.         Set BillboardVisible = 0
  2221.     Endif
  2222. RemoveSoftware = +
  2223.     Shell "" RemoveRasArpService
  2224.     Shell "" RemoveNdisTapiService
  2225.     set fIpxAllowed = FALSE
  2226.     Shell "" QuerySelectedProtocols
  2227.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2228.         set fIpxAllowed = $($R6)
  2229.     else
  2230.         Debug-Output "RemoveRas: error QuerySelectedProtocols"
  2231.     endif
  2232.     ifstr(i) $(fIpxAllowed) == TRUE
  2233.         Shell "" RemoveNwlnkRipService
  2234.         Shell "" RemoveIsnSapService
  2235.     endif
  2236.     Debug-Output "Remove Software List "$(REMOVE_SOFTWARE)
  2237.     ForListDo  $(REMOVE_SOFTWARE)
  2238.         Debug-Output "Removing software component: "$($)
  2239.         ifstr(i) $($) == RAS
  2240.              OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyBase) +
  2241.                         $(!MAXIMUM_ALLOWED) ProductKey
  2242.              Ifstr $(ProductKey) == $(KeyNull)
  2243.                 Debug-Output "OEMNSVRA.INF: could not open Software product key"
  2244.                  goto RemoveFiles
  2245.              endif
  2246.              DeleteRegTree $(ProductKey) $(Product$($)Name)
  2247.              CloseRegKey $(ProductKey)
  2248.         else
  2249.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $($)
  2250.         endif
  2251.     EndForListDo
  2252. RemoveFiles = +
  2253.     Ifstr(i) $(!STF_IDW) != TRUE
  2254.         Install RemoveRasFiles
  2255.     endif
  2256.     ifstr(i) $(DoServerOnly) == FALSE
  2257.         Install RemoveRasGroup
  2258.     endif
  2259.     Shell "" RemoveInfFromReviewPrograms
  2260.     shell "" RemoveNetGroupDependency
  2261. RemoveRasOver = +
  2262.     Debug-Output "OEMNSVRA.INF: Doing a forcible cleanup..."
  2263.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_SoftwareBase)"\Microsoft" +
  2264.                $(!MAXIMUM_ALLOWED) KeySoftware
  2265.     ifstr $(KeySoftware) != $(KeyNull)
  2266.         set SoftList = {"ASYNCMAC", "NDISWAN", "RAS", "RASMAN", +
  2267.                         "REMOTEACCESS"}
  2268.         ForListDo $(SoftList)
  2269.             DeleteRegTree $(KeySoftware) $($)
  2270.         EndForListDo
  2271.         set NetworkCardKey = $(KeyNull)
  2272.         OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) +
  2273.                    $(!MAXIMUM_ALLOWED) NetworkCardKey
  2274.         Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  2275.             set NetcardsList = {}
  2276.             EnumRegKey $(NetworkCardKey) NetcardsList
  2277.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2278.               ForListDo $(NetcardsList)
  2279.                set KeyName = *($($),1)
  2280.                set Card = $(KeyNull)
  2281.                OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  2282.                ifstr $(Card) == $(KeyNull)
  2283.                    Debug-Output "RemoveRas: could not open netcard key "$(KeyName)
  2284.                else
  2285.                    GetRegValue $(Card), "ProductName" ProductNameInfo
  2286.                    Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  2287.                       Debug-Output "RemoveRas: ProductName not found."
  2288.                    else
  2289.                       set CardProductName = *($(ProductNameInfo), 4)
  2290.                       Debug-Output "RemoveRas: ProductName. "$(CardProductName)
  2291.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  2292.                          DeleteRegTree $(NetworkCardKey) $(KeyName)
  2293.                       endif
  2294.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  2295.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2296.                       endif
  2297.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  2298.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2299.                       endif
  2300.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  2301.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2302.                       endif
  2303.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  2304.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2305.                       endif
  2306.                       ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  2307.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2308.                       endif
  2309.                       ifstr(i) $(CardProductName) == $(ProductRASASYMACName)
  2310.                           DeleteRegTree $(NetworkCardKey) $(KeyName)
  2311.                       endif
  2312.                    endif
  2313.               EndForListDo
  2314.             else
  2315.               Debug-Output "RemoveRas: EnumRegKey failed."
  2316.             endif
  2317.         else
  2318.             Debug-Output "RemoveRas: failed to open "$(!NetworkCardKeyName)
  2319.         endif
  2320.         CloseRegKey $(KeySoftware)
  2321.     else
  2322.         Debug-Output "RemoveRas: failed to open software key"
  2323.     endif
  2324.     OpenRegKey $(!REG_H_LOCAL) ""  $(!NTN_ServiceBase) +
  2325.                $(!MAXIMUM_ALLOWED) KeyServices
  2326.     ifstr $(KeyServices) != $(KeyNull)
  2327.         set ServiceList = {"ASYNCMAC", "NDISWAN", "RASARP", "RASMAN", +
  2328.                            "REMOTEACCESS"}
  2329.         ForListDo $(ServiceList)
  2330.             DeleteRegTree $(KeyServices) $($)
  2331.         EndForListDo
  2332.         EnumRegKey $(KeyServices) ServiceList
  2333.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  2334.            ForListDo $(ServiceList)
  2335.                set ServiceName = *($($),1)
  2336.                set Result = 1
  2337.             LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2338.                                 $(ServiceName) "NdisWan" 7
  2339.                ifint $(Result) == 0
  2340.                   Debug-Output "RemoveRas: Removing "$(ServiceName)
  2341.                   DeleteRegTree $(KeyServices) $(ServiceName)
  2342.                else
  2343.                    LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp +
  2344.                                 $(ServiceName) "AsyncMac" 8
  2345.                    ifint $(Result) == 0
  2346.                       Debug-Output "RemoveRas: Removing "$(ServiceName)
  2347.                       DeleteRegTree $(KeyServices) $(ServiceName)
  2348.                    endif
  2349.                endif
  2350.            EndForListDo
  2351.         endif
  2352.         CloseRegKey $(KeyServices)
  2353.     endif
  2354.     EndWait
  2355.     goto $(to)
  2356. BindingsRas = +
  2357.     Debug-Output "OEMNSVRA.INF:Review bindings is being called!!!."
  2358.     Shell "" UpdateSelectedProtocols
  2359.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2360.         Debug-Output "error shelling UpdateSelectedProtocols."
  2361.         goto ShellCodeError
  2362.     endif
  2363.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2364.         Debug-Output "error returned by UpdateSelectedProtocols."
  2365.     endif
  2366.     set fNetbeuiChosen = $($R1)
  2367.     set fTcpIpChosen   = $($R2)
  2368.     set fIpxChosen     = $($R3)
  2369.     ifstr(i) $(fNetbeuiChosen) == FALSE
  2370.         ifstr(i) $(fTcpIpChosen) == FALSE
  2371.             ifstr(i) $(fIpxChosen) == FALSE
  2372.                 set to = end
  2373.                 read-syms NoProtocolsDlg$(!STF_LANGUAGE)
  2374.                 Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoProtocolsWarning)
  2375.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2376.                     goto ShellCodeError
  2377.                 endif
  2378.                 goto RemoveRas
  2379.             endif
  2380.         endif
  2381.     endif
  2382.     set WkstaConfigured = FALSE
  2383.     set SrvrConfigured  = FALSE
  2384.     shell "" IsNetworkConfigured
  2385.     Debug-Output "IsNetworkConfigured returned R0 "$($R0)
  2386.     Debug-Output "IsNetworkConfigured returned R1 "$($R1)
  2387.     Debug-Output "IsNetworkConfigured returned R2 "$($R2)
  2388.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2389.         set WkstaConfigured  = $($R1)
  2390.         set SrvrConfigured   = $($R2)
  2391.     else
  2392.         read-syms NetworkConfigError$(!STF_LANGUAGE)
  2393.         set Text = $(Text1)
  2394.         shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "FATAL" $(Text)
  2395.         goto end
  2396.     endif
  2397.     ifstr(i) $(WkstaConfigured) == TRUE
  2398.         ifstr(i) $(SrvrConfigured) == TRUE
  2399.             goto ResetProgramList
  2400.         else
  2401.             goto InstallNetworkError
  2402.         endif
  2403.     else
  2404.         goto InstallNetworkError
  2405.     endif
  2406. InstallNetworkError =+
  2407.     set CommonStatus = STATUS_NO_EFFECT
  2408.     read-syms NetworkConfigError$(!STF_LANGUAGE)
  2409.     set Text = $(Text2)
  2410.     shell $(subroutninf) SetupMessage $(!STF_LANGUAGE) "STATUS" $(Text)
  2411. ResetProgramList =+
  2412.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  2413.     ifstr $(KeyRasMan) != $(KeyNull)
  2414.         GetRegValue $(KeyRasMan), "Review" ReviewInfo
  2415.         set ReviewValue = *($(ReviewInfo), 4)
  2416.         ifint $(ReviewValue) == 1
  2417.             Debug-Output "BindingsRas: resetting Review to 0"
  2418.             SetRegValue $(KeyRasMan) {Review,$(NoTitle),$(!REG_VT_DWORD), 0}
  2419.             Shell "" AddInfToReviewProgramsList
  2420.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2421.                 Debug-Output "error shelling AddInfToReviewProgramsList."
  2422.                 goto ShellCodeError
  2423.             endif
  2424.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2425.                 Debug-Output "error returned by AddInfToReviewProgramsList."
  2426.             endif
  2427.         endif
  2428.         CloseRegKey $(KeyRasMan)
  2429.     else
  2430.         Debug-Output "OEMNSVRA.INF: error opening SOFTWARE\RasMan\CurrentVersion key."
  2431.     endif
  2432.     shell "" QueryComponentsInstalled
  2433.     Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2434.         Set InstalledComps = $($R1)
  2435.         Set InstalledFlags = $($R2)
  2436.         Set DoServer      = *($(InstalledFlags),1)
  2437.         Set DoClient      = *($(InstalledFlags),2)
  2438.         Set DoAdmin       = *($(InstalledFlags),3)
  2439.         Set DoServerOnly  = *($(InstalledFlags),4)
  2440.         Set DoClientOnly  = *($(InstalledFlags),5)
  2441.         Set DoAdminOnly   = *($(InstalledFlags),6)
  2442.     Endif
  2443.     Debug-Output "Installed List is "$(InstalledComps)
  2444.     Debug-Output "Installed Flags is "$(InstalledFlags)
  2445.     set AsyStartValue = 4
  2446.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  2447.     ifstr $(KeyMac) == $(KeyNull)
  2448.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  2449.     else
  2450.         GetRegValue $(KeyMac), "Start" AsyStartInfo
  2451.         ifint $(RegLastError) == 0
  2452.             set AsyStartValue = *($(AsyStartInfo), 4)
  2453.         endif
  2454.         Debug-Output "OEMNSVRA.INF: AsyncMac start value "$(AsyStartValue)
  2455.         CloseRegKey $(KeyMac)
  2456.     endif
  2457.     set NdisWanParam = {}
  2458.     set NdisWanEndPointsLst = {}
  2459.     ifint $(AsyStartValue) != 4
  2460.         set RasMacLinkageKey = $(KeyNull)
  2461.         OpenRegKey $(!REG_H_LOCAL) "" $(RasMacLinkageKeyName) $(!MAXIMUM_ALLOWED) RasMacLinkageKey
  2462.         ifstr $(RasMacLinkageKey) == $(KeyNull)
  2463.             Debug-Output "OEMNSVRA.INF: could not open AsyncMac linkage key"
  2464.             set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2465.             goto fatalregistry
  2466.         endif
  2467.         GetRegValue $(RasMacLinkageKey), "Bind" BindInfo
  2468.     set NdisWanParam = *($(BindInfo), 4)
  2469.         CloseRegKey $(RasMacLinkageKey)
  2470.     set NdisWanParamKey = $(KeyNull)
  2471.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2472.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2473.         Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2474.         else
  2475.         GetRegValue $(NdisWanParamKey), "EndPoints" EndPointsInfo
  2476.             set EndPointsLst = *($(EndPointsInfo), 4)
  2477.         set NdisWanEndPointsLst = >($(NdisWanEndPointsLst),*($(EndPointsLst), 1))
  2478.         CloseRegKey $(NdisWanParamKey)
  2479.         endif
  2480.     endif
  2481.     set ProviderList = {}
  2482.     set RasTapiDevicesKey = $(KeyNull)
  2483.     OpenRegKey $(!REG_H_LOCAL) "" $(RasTapiDevicesKeyName) $(!MAXIMUM_ALLOWED) RasTapiDevicesKey
  2484.     ifstr $(RasTapiDevicesKey) != $(KeyNull)
  2485.        set TapiProviderList = {}
  2486.        EnumRegKey $(RasTapiDevicesKey) TapiProviderList
  2487.        ForListDo $(TapiProviderList)
  2488.            set TapiAddress = {}
  2489.            set NumEndPoints = 0
  2490.            set ProviderName = *($($),1)
  2491.            Debug-Output "OEMNSVRA.INF: TAPI provider name = "$(ProviderName)
  2492.            OpenRegKey $(RasTapiDevicesKey) "" $(ProviderName) $(!MAXIMUM_ALLOWED) Provider
  2493.            ifstr $(Provider) != $(KeyNull)
  2494.                GetRegValue $(Provider), "Address" TapiAddress
  2495.                set AdapterNum = ""
  2496.                set EndPointCount = 0
  2497.                set tmpNdisWanParam = {}
  2498.                set tmpNdisWanEndPointsLst = {}
  2499.                set DeviceName = ""
  2500.                ForListDo *($(TapiAddress),4)
  2501.                    Split-String $($) "- " Address
  2502.                    set NewAdapterNum = *($(Address), 1)
  2503.                    ifstr(i) $(AdapterNum) != $(NewAdapterNum)
  2504.                      ifstr(i) $(AdapterNum) != ""
  2505.                         set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2506.                         set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2507.                         set EndPointCount = 0
  2508.                      endif
  2509.                      set AdapterNum = $(NewAdapterNum)
  2510.                      set DeviceName = "\Device\"$(ProviderName)$(AdapterNum)
  2511.                    endif
  2512.                    set-add EndPointCount = $(EndPointCount), 1
  2513.                EndForListDo
  2514.                ifstr $(DeviceName) != ""
  2515.                    set tmpNdisWanParam = >($(tmpNdisWanParam), $(DeviceName))
  2516.                    set tmpNdisWanEndPointsLst = >($(tmpNdisWanEndPointsLst), $(EndPointCount))
  2517.                endif
  2518.                CloseRegKey $(Provider)
  2519.            else
  2520.               Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES\"$(DriverName)" key."
  2521.            endif
  2522.            set ProviderKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)
  2523.            set ProviderLinkageKeyName = $(!NTN_ServiceBase)"\"$(ProviderName)"\Linkage"
  2524.            Debug-Output "TAPI provider key name "$(ProviderKeyName)
  2525.            set ProviderKey = $(KeyNull)
  2526.            set ProviderLinkageKey = $(KeyNull)
  2527.            OpenRegKey $(!REG_H_LOCAL) "" $(ProviderKeyName) $(!MAXIMUM_ALLOWED) ProviderKey
  2528.            ifstr $(ProviderKey) == $(KeyNull)
  2529.              Debug-Output "OEMNSVRA.INF: could not open key "$(ProviderKeyName)
  2530.            else
  2531.              set DeleteFlag = 0
  2532.              set DeleteFlagInfo = {}
  2533.              GetRegValue $(ProviderKey),"DeleteFlag", DeleteFlagInfo
  2534.              set DeleteFlag = *($(DeleteFlagInfo), 4)
  2535.              ifint $(DeleteFlag) != 1
  2536.                set ProviderList = >($(ProviderList), $(ProviderName))
  2537.                Shell "" AddServiceDependency $(ProviderName) "NdisTapi"
  2538.                ForListDo $(tmpNdisWanParam)
  2539.                  set NdisWanParam = >($(NdisWanParam), $($))
  2540.                  set NdisWanEndPointsLst = >($(NdisWanEndPointsLst), *($(tmpNdisWanEndPointsLst), $(#)))
  2541.                EndForListDo
  2542.              endif
  2543.              CloseRegKey $(ProviderKey)
  2544.            endif
  2545.        EndForListDo
  2546.        CloseRegKey $(RasTapiDevicesKey)
  2547.     else
  2548.         Debug-Output "OEMNSVRA.INF: could not open RAS\TAPI DEVICES key"
  2549.     endif
  2550.     set NumBindings = 0
  2551.     Debug-Output "NdisWan param Bind value = "$(NdisWanParam)
  2552.     QueryListSize NumBindings $(NdisWanParam)
  2553.     Debug-Output "Number of Ndiswan bindings = "$(NumBindings)
  2554.     ifint $(NumBindings) == 0
  2555.         Debug-Output "Removing RAS because no ports are configured"
  2556.         set to = end
  2557.         read-syms NoPortsConfigured$(!STF_LANGUAGE)
  2558.         Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoPortsError)
  2559.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2560.             goto ShellCodeError
  2561.         endif
  2562.         goto RemoveRas
  2563.     endif
  2564.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanParamKeyName) $(!MAXIMUM_ALLOWED) NdisWanParamKey
  2565.     ifstr $(NdisWanParamKey) == $(KeyNull)
  2566.     Debug-Output "OEMNSVRA.INF: could not open NdisWanParamKey"
  2567.         set RegistryErrorIndex = UNABLE_ACCESS_CONFIGURE_SERVICE
  2568.         goto fatalregistry
  2569.     endif
  2570.     Debug-Output "Setting NdisWan param Bind to "$(NdisWanParam)
  2571.     set NewValueList = {{Bind, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanParam)}}
  2572.     Shell $(UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2573.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2574.     CloseRegKey $(NdisWanParamKey)
  2575.         goto ShellCodeError
  2576.     endif
  2577.     Debug-Output "Setting NdisWan param EndPoints to "$(NdisWanEndPointsLst)
  2578.     set NewValueList = {{EndPoints, $(NoTitle), $(!REG_VT_MULTI_SZ), $(NdisWanEndPointsLst)}}
  2579.     Shell $(UtilityInf), AddValueList, $(NdisWanParamKey), $(NewValueList)
  2580.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2581.     CloseRegKey $(NdisWanParamKey)
  2582.         goto ShellCodeError
  2583.     endif
  2584.     CloseRegKey $(NdisWanParamKey)
  2585.     LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2586.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRasmanSecurityDescriptor
  2587.     Debug-Output "Result of setting Rasman security descriptor "$(Result)
  2588.     LibraryProcedure Result, $(PORTSDLGHANDLE), InitRemoteSecurityDescriptor
  2589.     Debug-Output "Result of setting Remote security descriptor "$(Result)
  2590.     Shell "" UpdateCPList
  2591.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2592.         Debug-Output "error shelling UpdateCPList."
  2593.         goto ShellCodeError
  2594.     endif
  2595.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2596.         Debug-Output "error returned by UpdateCPList."
  2597.     endif
  2598.     ifstr(i) $(fTcpIpChosen) == TRUE
  2599.         shell "" UpdateLLInterface
  2600.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2601.             Debug-Output "error shelling UpdateLLInterface."
  2602.             goto ShellCodeError
  2603.         endif
  2604.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2605.             Debug-Output "error returned by UpdateLLInterface."
  2606.         endif
  2607.     endif
  2608.     shell "" UpdateNetGroupDependency $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen)
  2609.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2610.         Debug-Output "error shelling UpdateNetGroupDependency."
  2611.         goto ShellCodeError
  2612.     endif
  2613.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2614.         Debug-Output "error returned by UpdateNetGroupDependency."
  2615.     endif
  2616.     set fNoNetbeuiWarning = 0
  2617.     ifstr(i) $(fNetbeuiChosen) == FALSE
  2618.         OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  2619.         ifstr $(KeyRasProtocols) != $(KeyNull)
  2620.             GetRegValue $(KeyRasProtocols), "fNoNetbeuiWarning" NetbeuiInfo
  2621.             set fNoNetbeuiWarning = *($(NetbeuiInfo), 4)
  2622.             ifint $(fNoNetbeuiWarning) != 1
  2623.                 read-syms NoNetbeuiDlg$(!STF_LANGUAGE)
  2624.                 Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(NoNetbeuiWarning)
  2625.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2626.                     goto ShellCodeError
  2627.                 endif
  2628.             endif
  2629.             SetRegValue $(KeyRasProtocols) {fNoNetbeuiWarning,$(NoTitle),$(!REG_VT_DWORD), 1}
  2630.             CloseRegKey $(KeyRasProtocols)
  2631.         else
  2632.             Debug-Output "Bindings: unable to open RasProtocolKeyName"
  2633.         endif
  2634.     endif
  2635.     Debug-Output "Review bindings done."
  2636.     goto end
  2637. UpgradeRas = +
  2638.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  2639.     Ifstr $(KeyProduct) != $(KeyNull)
  2640.         Shell $(UtilityInf), GetInfFileNameFromRegistry, $(KeyProduct)
  2641.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2642.             Debug-Output "ShellCode error"
  2643.             goto ShellCodeError
  2644.         endif
  2645.         set !UG_Filename = $($R0)
  2646.         ifstr(i) $(!UG_Filename) != ""
  2647.             Debug-Output "File Name is "$(!UG_Filename)
  2648.             StartWait
  2649.             read-syms UpgradeErrors$(!STF_LANGUAGE)
  2650.             read-syms StatusUpdatingRegistry$(!STF_LANGUAGE)
  2651.             Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(UpdatingRas)
  2652.             Set BillboardVisible = 1
  2653.             shell "" QueryComponentsInstalled
  2654.             Ifstr(i) $($R0) == STATUS_SUCCESSFUL
  2655.                 Set InstalledComps = $($R1)
  2656.                 Set InstalledFlags = $($R2)
  2657.                 Set DoServer      = *($(InstalledFlags),1)
  2658.                 Set DoClient      = *($(InstalledFlags),2)
  2659.                 Set DoAdmin       = *($(InstalledFlags),3)
  2660.                 Set DoServerOnly  = *($(InstalledFlags),4)
  2661.                 Set DoClientOnly  = *($(InstalledFlags),5)
  2662.                 Set DoAdminOnly   = *($(InstalledFlags),6)
  2663.             Endif
  2664.             Debug-Output "Installed List is "$(InstalledComps)
  2665.             Debug-Output "Installed Flags is "$(InstalledFlags)
  2666.             Set ServerInstalled = $(DoServer)
  2667.             Set ClientInstalled = $(DoClient)
  2668.             Set AdminInstalled  = $(DoAdmin)
  2669.             Debug-Output "Unattended upgrade? "$(!STF_UNATTENDED)
  2670.             ifstr(i) $(!STF_UNATTENDED) == NO
  2671.                 set !OverWrite = FALSE
  2672.                 LibraryProcedure FilePresent, $(!LIBHANDLE), CheckFileExistance $(!STF_WINDOWSSYSPATH)"\ras\modem.inf"
  2673.                 ifstr(i) $(FilePresent) == "YES"
  2674.                     read-syms ConfirmOverwriteDlg$(!STF_LANGUAGE)
  2675.                     ui start "ConfirmOverwriteDlg"
  2676.                     ifstr(i) $(DLGEVENT) == "YES"
  2677.                         set !OverWrite = TRUE
  2678.                         Debug-Output "OEMNSVRA.INF:modem.inf will be overwritten."
  2679.                     endif
  2680.                 endif
  2681.             else
  2682.                 set !OverWrite = TRUE
  2683.             endif
  2684.             Install InstallResources
  2685.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2686.                 goto filecopycancel
  2687.             endif
  2688.             Install InstallRasFiles
  2689.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  2690.                 goto filecopycancel
  2691.             endif
  2692.             LoadLibrary "x" $(!STF_CWDDIR)rascfg.dll PORTSDLGHANDLE
  2693.             LibraryProcedure Result, $(PORTSDLGHANDLE), RenameRasHubToNdisWan
  2694.             Shell "" RenameRasHubToNdisWan
  2695.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2696.                 Debug-Output "OEMNSVRA.INF:error shelling RenameRasHubToNdisWan."
  2697.                 goto ShellCodeError
  2698.             endif
  2699.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2700.                 Debug-Output "OEMNSVRA.INF:error returned by RenameRasHubToNdisWan."
  2701.                 goto end
  2702.             endif
  2703.             Shell "" IsNdisWanBHAdapterInstalled
  2704.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2705.                Debug-Output "OEMNSVRA.INF:error shelling IsNdisWanBHAdapterInstalled"
  2706.                goto ShellCodeError
  2707.             endif
  2708.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2709.                 Shell "" InstallNdisWanBHAdapter
  2710.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2711.                    Debug-Output "OEMNSVRA.INF:error shelling InstallNdisWanBHAdapter"
  2712.                    goto ShellCodeError
  2713.                 endif
  2714.                 ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2715.                      set RegistryErrorIndex = $($R0)
  2716.                      Debug-Output "Error installing NdisWan Blood hound adapter"
  2717.                      goto fatalregistry
  2718.                 endif
  2719.             endif
  2720.             Shell "" InstallNdisTapiService
  2721.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2722.                  Debug-Output "Error shelling InstallNdisTapiService "
  2723.                  goto ShellCodeError
  2724.             endif
  2725.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2726.                  set RegistryErrorIndex = $($R0)
  2727.                  Debug-Output "Error installing NdisTapi Service"
  2728.                  goto fatalregistry
  2729.             endif
  2730.             Shell "" UpdateAsyncMacNetRules
  2731.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2732.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacNetRules."
  2733.                 goto ShellCodeError
  2734.             endif
  2735.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2736.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacNetRules."
  2737.                 goto end
  2738.             endif
  2739.             Shell "" UpdateNdisWanInfo
  2740.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2741.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateNdisWanInfo."
  2742.                 goto ShellCodeError
  2743.             endif
  2744.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2745.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateNdisWanInfo."
  2746.                 goto end
  2747.             endif
  2748.             Shell "" AddNDISWANToServiceGroupOrder
  2749.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2750.                Debug-Output "Cannot add NDISWAN to ServiceGroupOrder"
  2751.                goto ShellCodeError
  2752.             endif
  2753.             Shell "" UpdateAsyncMacParameters
  2754.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2755.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacParameters."
  2756.                 goto ShellCodeError
  2757.             endif
  2758.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2759.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacParameters."
  2760.                 goto end
  2761.             endif
  2762.             Shell "" UpdateAsyncMacStartType
  2763.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2764.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateAsyncMacStartType."
  2765.                 goto ShellCodeError
  2766.             endif
  2767.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2768.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateAsyncMacStartType."
  2769.                 goto end
  2770.             endif
  2771.             Shell "" UpgradeSelectedProtocols
  2772.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2773.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeSelectedProtocols."
  2774.                 goto ShellCodeError
  2775.             endif
  2776.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2777.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeSelectedProtocols."
  2778.                 goto end
  2779.             endif
  2780.             ifstr(i) $(!STF_STANDARDSERVERUPGRADE) == "YES"
  2781.                 OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) +
  2782.                                               $(!MAXIMUM_ALLOWED) KeyProtocols
  2783.                 ifstr $(KeyProtocols) != $(KeyNull)
  2784.                     set fDialin = FALSE
  2785.                     set TmpList = {}
  2786.                     GetRegValue $(KeyProtocols) "fNetbeuiAllowed" TmpList
  2787.                     ifint $(RegLastError) == 0
  2788.                         ifstr *($(TmpList), 4) == 1
  2789.                             set fDialin = TRUE
  2790.                         endif
  2791.                     endif
  2792.                     set TmpList = {}
  2793.                     ifstr(i) $(fDialin) == FALSE
  2794.                         GetRegValue $(KeyProtocols) "fTcpIpAllowed" TmpList
  2795.                         ifint $(RegLastError) == 0
  2796.                             ifstr *($(TmpList), 4) == 1
  2797.                                 set fDialin = TRUE
  2798.                             endif
  2799.                         endif
  2800.                     endif
  2801.                     set TmpList = {}
  2802.                     ifstr(i) $(fDialin) == FALSE
  2803.                         GetRegValue $(KeyProtocols) "fIpxAllowed" TmpList
  2804.                         ifint $(RegLastError) == 0
  2805.                             ifstr *($(TmpList), 4) == 1
  2806.                                 set fDialin = TRUE
  2807.                             endif
  2808.                         endif
  2809.                     endif
  2810.                     Debug-Output "OEMNSVRA.INF: Upgrade => Are dialin ports configured? "$(fDialin)
  2811.                     ifstr(i) $(fDialin) == TRUE
  2812.                         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrKeyName) +
  2813.                                                      $(!MAXIMUM_ALLOWED) KeySvr
  2814.                         ifstr $(KeySvr) != $(KeyNull)
  2815.                             Debug-Output "OEMNSVRA.INF: Changing RemoteAccess Start value to 2"
  2816.                             SetRegValue $(KeySvr) +
  2817.                                          {Start,$(NoTitle),$(!REG_VT_DWORD),2)}
  2818.                             CloseRegKey $(KeySvr)
  2819.                         else
  2820.                             Debug-Output "OEMNSVRA.INF: error opening RemoteAccess service key"
  2821.                         endif
  2822.                     endif
  2823.                     CloseRegKey $(KeyProtocols)
  2824.                 else
  2825.                     Debug-Output "OEMNSVRA.INF: could not open RAS\Protocols key"
  2826.                 endif
  2827.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2828.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2829.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2830.                     CloseRegKey $(ParamKey)
  2831.                 EndIf
  2832.             endif
  2833.             Shell "" UpgradeIpxInfo $(PORTSDLGHANDLE)
  2834.             Shell "" UpgradeIsdnInfo
  2835.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2836.                 Debug-Output "OEMNSVRA.INF:error shelling UpgradeIsdnInfo."
  2837.                 goto ShellCodeError
  2838.             endif
  2839.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2840.                 Debug-Output "OEMNSVRA.INF:error returned by UpgradeIsdnInfo."
  2841.                 set Error = $(UpgradeIsdnInfoError)
  2842.                 goto fatal
  2843.             endif
  2844.             Shell "" UpdatePerfmonInfo
  2845.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2846.                 Debug-Output "OEMNSVRA.INF:error shelling UpdatePerfmonInfo."
  2847.                 goto ShellCodeError
  2848.             endif
  2849.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2850.                 Debug-Output "OEMNSVRA.INF:error returned by UpdatePerfmonInfo."
  2851.                 goto end
  2852.             endif
  2853.             Shell "" UpdateCPList
  2854.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2855.                 Debug-Output "OEMNSVRA.INF:error shelling UpdateCPList."
  2856.                 goto ShellCodeError
  2857.             endif
  2858.             Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  2859.                 Debug-Output "OEMNSVRA.INF:error returned by UpdateCPList."
  2860.                 goto end
  2861.             endif
  2862.             ifstr(i) $(!STF_PRODUCT) != "WINNT"
  2863.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName)"\Parameters" $(!MAXIMUM_ALLOWED) ParamKey
  2864.                 Ifstr(i) $(ParamKey) != $(KeyNull)
  2865.                     SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  2866.                     CloseRegKey $(ParamKey)
  2867.                 EndIf
  2868.             EndIf
  2869.             Install RemoveRasGroup
  2870.             Install CreateRasGroup
  2871.             EndWait
  2872.             Ifint $(BillboardVisible) != 0
  2873.                 Shell "subroutn.inf" PopBillboard
  2874.                 Set BillboardVisible = 0
  2875.             Endif
  2876.         endif
  2877.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)}
  2878.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)}
  2879.         CloseRegKey $(KeyProduct)
  2880.     else
  2881.         Set RegistryErrorIndex = $($R0)
  2882.         goto fatalregistry
  2883.     endif
  2884.     goto end
  2885. successful = +
  2886.     Ifstr(i) $(!NTN_InstallMode) == "install"
  2887.        Debug-Output "OEMNSVRA.INF: Creating Ras Group and Icons"
  2888.        ifstr(i) $(DoServerOnly) == FALSE
  2889.            install CreateRasGroup
  2890.        endif
  2891.     EndIf
  2892.     Ifstr(i) $(!NTN_InstallPhase) == primary
  2893.         goto installstep1
  2894.     else-ifstr(i) $(!NTN_InstallMode) == configure
  2895.         goto installstep1
  2896.     endif
  2897.     read-syms SuccessfulInstall$(!STF_LANGUAGE)
  2898.     set DlgText = $(Success)
  2899.     ifint $(NewNumDialin) != 0
  2900.         set DlgText = $(DlgText)$(LF)$(LF)$(AdminMsg)
  2901.         read-syms RasInstallOverDlg$(!STF_LANGUAGE)
  2902.         ui start "RasInstallOver" $(RASDLGHANDLE)
  2903.     endif
  2904.     ui pop 1
  2905. installstep1 = +
  2906.     goto end
  2907. warning = +
  2908.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "WARNING", $(Error)
  2909.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2910.     goto ShellCodeError
  2911.     endif
  2912.     ifstr(i) $($R1) == "OK"
  2913.        goto $(to)
  2914.     else-ifstr(i) $($R1) == "CANCEL"
  2915.        goto $(from)
  2916.     else
  2917.        Debug-Msg "Error Error Bad DLGEVENT"
  2918.        goto "end"
  2919.     endif
  2920. nonfatal = +
  2921.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(Error)
  2922.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2923.         goto ShellCodeError
  2924.     endif
  2925.     ifstr(i) $($R1) == "OK"
  2926.         goto $(from)
  2927.     else
  2928.         goto "end"
  2929.     endif
  2930. fatalregistry = +
  2931.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  2932.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2933.        Debug-Output "fatalregistry: shell to find RegistryErrorString failed."
  2934.        goto ShellCodeError
  2935.     endif
  2936.     ifstr(i) $(RasSpecificString) != ""
  2937.         set Error = $($R0)" - service "$(RasSpecificString)"."
  2938.     else
  2939.         set Error = $($R0)
  2940.     endif
  2941.     read-syms AbortMessage$(!STF_LANGUAGE)
  2942.     set Error = $(Error)$(!LF)$(!LF)$(AbortText)
  2943.     goto fatal
  2944. fatal =    +
  2945.     Shell $(subroutninf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  2946.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  2947.         Debug-Output "fatal: shell to SetupMessage failed."
  2948.     goto ShellCodeError
  2949.     endif
  2950.     goto setfailed
  2951. ShellCodeError = +
  2952.     read-syms ShellCodeErrorMsg$(!STF_LANGUAGE)
  2953.     ui start "Error Message"
  2954.     goto setfailed
  2955. setfailed = +
  2956.     set CommonStatus = STATUS_FAILED
  2957.     ifstr(i) $(fRemoveRas) == TRUE
  2958.         set fRemoveRas = FALSE
  2959.         set from = setfailed
  2960.         set to   = end
  2961.         goto RemoveRas
  2962.     endif
  2963.     goto end
  2964. filecopycancel =+
  2965.     set CommonStatus = STATUS_NO_EFFECT
  2966.     ifstr(i) $(fRemoveRas) == TRUE
  2967.         set fRemoveRas = FALSE
  2968.         set from = setfailed
  2969.         set to   = end
  2970.         goto RemoveRas
  2971.     endif
  2972. end = +
  2973.     ifstr(i) $(RASDLGHANDLE) != $(HandleNull)
  2974.         Debug-Output "Unloading RASRES.DLL"
  2975.         FreeLibrary $(RASDLGHANDLE)
  2976.     endif
  2977.     ifstr(i) $(PORTSDLGHANDLE) != $(HandleNull)
  2978.         Debug-Output "Unloading RASCFG.DLL"
  2979.         FreeLibrary $(PORTSDLGHANDLE)
  2980.     endif
  2981.     Debug-Output "ending at last!!"
  2982.     goto term
  2983. term = +
  2984.     Debug-Output "OEMNSVRA.INF:term: CommonStatus "$(CommonStatus)
  2985.     Return $(CommonStatus)
  2986. [BindingsReview]
  2987.     set Option   = $($1)
  2988.     set SrcDir   = $($2)
  2989.     set AddCopy  = $($3)
  2990.     set DoCopy   = $($4)
  2991.     set DoConfig = $($5)
  2992.     set Language = $(!STF_LANGUAGE)
  2993.     set SaveInstallMode = $(!NTN_InstallMode)
  2994.     set !NTN_InstallMode = bind
  2995.     Shell "" InstallOption $(Language) $(Option) $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig)
  2996.     set !NTN_InstallMode = $(SaveInstallMode)
  2997.     set Status = $($R0)
  2998.     Return $(Status)
  2999. [AddInfToReviewProgramsList]
  3000.     Debug-Output "AddInfToReviewPrograms: entry"
  3001.     set Status  = STATUS_FAILED
  3002.     set KeyNull = ""
  3003.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3004.     set newList = {"OEMNSVRA.INF"}
  3005.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3006.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3007.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3008.         ifint $(RegLastError) == 0
  3009.             Debug-Output "AddInf: old List "*($(TmpList), 4)
  3010.             ForListDo *($(TmpList),4)
  3011.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3012.                     set newList = >($(newList), $($))
  3013.                 endif
  3014.             EndForListDo
  3015.             Debug-Output "OEMNSVRA.INF: AddInf: new List "$(newList)
  3016.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3017.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3018.             CloseRegKey $(KeyNcpa)
  3019.             Set Status = STATUS_SUCCESSFUL
  3020.         endif
  3021.     else
  3022.         Debug-Output "AddInfToReviewPrograms: error opening ncpa key."
  3023.     endif
  3024.     Debug-Output "AddInfToReviewPrograms: exit"
  3025.     return $(Status)
  3026. [RemoveInfFromReviewPrograms]
  3027.     Debug-Output "RemoveInfFromReviewPrograms: entry"
  3028.     set Status  = STATUS_FAILED
  3029.     set KeyNull = ""
  3030.     set NcpaKeyName = $(!NTN_SoftwareBase)"\Microsoft\Ncpa\CurrentVersion"
  3031.     set newList = {}
  3032.     OpenRegKey $(!REG_H_LOCAL) "" $(NcpaKeyName) $(!MAXIMUM_ALLOWED) KeyNcpa
  3033.     Ifstr(i) $(KeyNcpa) != $(KeyNull)
  3034.         GetRegValue    $(KeyNcpa) "ReviewPrograms" TmpList
  3035.         ifint $(RegLastError) == 0
  3036.             Debug-Output "RemoveInf: old List "*($(TmpList), 4)
  3037.             ForListDo *($(TmpList),4)
  3038.                 ifstr(i) $($) != "OEMNSVRA.INF"
  3039.                     set newList = >($(newList), $($))
  3040.                 endif
  3041.             EndForListDo
  3042.             Debug-Output "AddInf: new List "$(newList)
  3043.             SetRegValue $(KeyNcpa) {ReviewPrograms, 0, +
  3044.                                     $(!REG_VT_MULTI_SZ),$(newList)}
  3045.             CloseRegKey $(KeyNcpa)
  3046.             Set Status = STATUS_SUCCESSFUL
  3047.         endif
  3048.     else
  3049.         Debug-Output "RemoveInfFromReviewPrograms: error opening ncpa key."
  3050.     endif
  3051.     Debug-Output "RemoveInfFromReviewPrograms: exit"
  3052.     return $(Status)
  3053. [InstallResources]
  3054.     set STF_VITAL = NO    
  3055.     Debug-Output  "In Copying Files"
  3056.     Debug-Output "OEMNSVRA.INF:Value of OverWrite "$(!OverWrite)
  3057.     ifstr(i) $(AddCopy) == "YES"
  3058.         CreateDir $(RasDir)
  3059.         AddSectionFilesToCopyList Files-Resource $(SourceDir) $(!STF_WINDOWSSYSPATH)
  3060.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasico" $(SourceDir) $(ProductPath)
  3061.         AddSectionKeyFileToCopyList Files-Ras-Inf "rasread" $(SourceDir) $(ProductPath)
  3062.         ifstr(i) $(!OverWrite) == TRUE
  3063.             Ifstr(i) $(!NTN_InstallMode) == "Update"
  3064.                forlistdo {modem.bak, pad.bak, switch.bak}
  3065.                    LibraryProcedure Status, $(!LIBHANDLE), DelFile +
  3066.                                             $(!STF_WINDOWSSYSPATH)"\RAS\"$($)
  3067.                endforlistdo
  3068.                forlistdo {modem, pad, switch}
  3069.                    LibraryProcedure Status, $(!LIBHANDLE), RenFile +
  3070.                                             $(!STF_WINDOWSSYSPATH)"\RAS\"$($)".inf" +
  3071.                                             $(!STF_WINDOWSSYSPATH)"\RAS\"$($)".BAK"
  3072.                endforlistdo
  3073.             EndIf
  3074.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3075.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3076.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3077.         else
  3078.             set STF_RENAME = "MODEM.NEW"
  3079.             AddSectionKeyFileToCopyList Files-Ras-Inf "modem" $(SourceDir) $(ProductPath)
  3080.             set STF_RENAME = "PAD.NEW"
  3081.             AddSectionKeyFileToCopyList Files-Ras-Inf "pad" $(SourceDir) $(ProductPath)
  3082.             set STF_RENAME = "SWITCH.NEW"
  3083.             AddSectionKeyFileToCopyList Files-Ras-Inf "switch" $(SourceDir) $(ProductPath)
  3084.             set STF_RENAME = ""
  3085.         endif
  3086.     endif
  3087.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3088.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3089.        CopyFilesInCopyList
  3090.     else-ifstr(i) $(DoCopy) == "YES"
  3091.         set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3092.         CopyFilesInCopyList
  3093.     endif
  3094.     Debug-Output  "Done Copying Files"
  3095.     exit
  3096. [RemoveResources]
  3097.     Debug-Output "In removing infs and dll"
  3098.     set RemoveList = {}
  3099.     set RenameList = {}
  3100.     set RemoveList = >($(RemoveList), #(Files-RemoveList, MODEMINF, 1))
  3101.     set RemoveList = >($(RemoveList), #(Files-RemoveList, PADINF, 1))
  3102.     set RemoveList = >($(RemoveList), #(Files-RemoveList, SWITCHINF, 1))
  3103.     set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSETUPHLP, 1))
  3104.     set RenameList = >($(RenameList), #(Files-RemoveList, RASRESDLL, 1))
  3105.     set RenameList = >($(RenameList), #(Files-RemoveList, RASCFGDLL, 1))
  3106.     set RenameList = >($(RenameList), #(Files-RemoveList, RASFIL32DLL, 1))
  3107.     ForListDo $(RemoveList)
  3108.         Debug-Output "Removing "$($)
  3109.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3110.         Debug-Output "Status is "$(Status)
  3111.     EndForListDo
  3112.     ForListDo $(RenameList)
  3113.         Split-String $($) "\" FilePath
  3114.         QueryListSize PathLen $(FilePath)
  3115.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3116.         Set FileName = *($(FullFileName),1)
  3117.         Debug-Output "FileName is "$(FileName)
  3118.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3119.         Debug-Output "CheckFile Status = "$(STATUS)
  3120.         ifstr(i) $(STATUS) == YES
  3121.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3122.             Debug-Output "Delfile Status = "$(STATUS)
  3123.         endif
  3124.         Debug-Output "Renaming from "$($)
  3125.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3126.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3127.         Debug-Output "Status is "$(Status1)
  3128.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\"$(FileName)".old"
  3129.     EndForListDo
  3130.     exit
  3131. [InstallRasFiles]
  3132.     set STF_VITAL = NO
  3133.     Debug-Output  "In InstallRasFiles Copying Files"
  3134.     Debug-Output  "ServerInstalled "$(ServerInstalled)
  3135.     Debug-Output  "ClientInstalled "$(ClientInstalled)
  3136.     ifstr(i) $(DoAdmin) == TRUE
  3137.         AddSectionFilesToCopyList Files-Ras-Admin $(SourceDir) +
  3138.                   $(!STF_WINDOWSSYSPATH)
  3139.         ifstr(i) $(DoAdminOnly) == TRUE
  3140.             goto InstallRasFiles1
  3141.         endif
  3142.     endif
  3143.     ifstr(i) $(DoClient) == TRUE
  3144.         AddSectionFilesToCopyList Files-Ras-Client $(SourceDir) +
  3145.                  $(!STF_WINDOWSSYSPATH)
  3146.     endif
  3147.     ifstr(i) $(DoServer) == TRUE
  3148.         AddSectionFilesToCopyList Files-Ras-Server $(SourceDir) +
  3149.                  $(!STF_WINDOWSSYSPATH)
  3150.     endif
  3151.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3152.         AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3153.                      $(!STF_WINDOWSSYSPATH)
  3154.         AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3155.                      $(!STF_WINDOWSSYSPATH)\drivers
  3156.     else
  3157.         ifstr(i) $(ServerInstalled) == FALSE
  3158.             ifstr(i) $(ClientInstalled) == FALSE
  3159.                 AddSectionFilesToCopyList Files-Ras-Common $(SourceDir) +
  3160.                              $(!STF_WINDOWSSYSPATH)
  3161.                 AddSectionFilesToCopyList Files-Ras-Drivers $(SourceDir) +
  3162.                              $(!STF_WINDOWSSYSPATH)\drivers
  3163.             endif
  3164.         endif
  3165.     endif
  3166. InstallRasFiles1 = +
  3167.     ifstr(i) $(!NTN_InstallMode) == "Update"
  3168.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3169.        CopyFilesInCopyList
  3170.     else
  3171.        ifstr(i) $(DoCopy) == "YES"
  3172.           set !STF_NCPA_FLUSH_COPYLIST = TRUE
  3173.           CopyFilesInCopyList
  3174.        endif
  3175.     endif
  3176.     Debug-Output  "Done Copying Files"
  3177.     exit
  3178. [RemoveRasFiles]
  3179.     ifstr(i) $(!NTN_InstallMode) == install
  3180.         ifstr(i) $(DoCopy) == "NO"
  3181.            Exit
  3182.         endif
  3183.     endif
  3184.     set RemoveList = {}
  3185.     set RenameList = {}
  3186.     set fCommonRemoved = FALSE
  3187.     ifstr(i) $(DoServer) == TRUE
  3188.        set fCommonRemoved = TRUE
  3189.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGTWYDLL, 1))
  3190.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGPRXYDLL, 1))
  3191.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPRXYEXE, 1))
  3192.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSRVEXE, 1))
  3193.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSDLL, 1))
  3194.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRSINI, 1))
  3195.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCTRNMH, 1))
  3196.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSAUTHDLL, 1))
  3197.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINDLL, 1))
  3198.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3199.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3200.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3201.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3202.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3203.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3204.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3205.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3206.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3207.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3208.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3209.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3210.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3211.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3212.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3213.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3214.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3215.        set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3216.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3217.        set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  3218.     endif
  3219.     ifstr(i) $(DoClient) == TRUE
  3220.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASDIALEXE, 1))
  3221.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPHONEHLP, 1))
  3222.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCAUTHDLL, 1))
  3223.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASAPI32DLL, 1))
  3224.        ifstr(i) $(fCommonRemoved) == FALSE
  3225.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANDLL, 1))
  3226.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMANEXE, 1))
  3227.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMSGDLL, 1))
  3228.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASMXSDLL, 1))
  3229.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSERDLL, 1))
  3230.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPXCPDLL, 1))
  3231.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPDLL, 1))
  3232.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPPPENDLL, 1))
  3233.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASPAPDLL, 1))
  3234.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCHAPDLL, 1))
  3235.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASSPAPDLL, 1))
  3236.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPCPDLL, 1))
  3237.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASIPHLPDLL, 1))
  3238.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBFCPDLL, 1))
  3239.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCCPDLL, 1))
  3240.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASCBCPDLL, 1))
  3241.            set RemoveList = >($(RemoveList), #(Files-RemoveList, RASNBIPCDLL, 1))
  3242.            set RenameList = >($(RenameList), #(Files-RemoveList, ASYNCMACSYS, 1))
  3243.        set RenameList = >($(RenameList), #(Files-RemoveList, NDISWANSYS, 1))
  3244.            set RenameList = >($(RenameList), #(Files-RemoveList, RASARPSYS, 1))
  3245.        endif
  3246.     endif
  3247.     ifstr(i) $(DoAdmin) == TRUE
  3248.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASADMINHLP, 1))
  3249.        set RemoveList = >($(RemoveList), #(Files-RemoveList, RASGLOSSHLP, 1))
  3250.     endif
  3251.     ForListDo $(RemoveList)
  3252.         Debug-Output "Removing "$($)
  3253.         LibraryProcedure Status , $(!LIBHANDLE), DelFile $($)
  3254.         Debug-Output "Status is "$(Status)
  3255.     EndForListDo
  3256.     ForListDo $(RenameList)
  3257.         Split-String $($) "\" FilePath
  3258.         QueryListSize PathLen $(FilePath)
  3259.         Split-String *($(FilePath),$(PathLen)) "." FullFileName
  3260.         Set FileName = *($(FullFileName),1)
  3261.         Debug-Output "FileName is "$(FileName)
  3262.         LibraryProcedure STATUS, $(!LIBHANDLE),CheckFileExistance $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3263.         Debug-Output "CheckFile Status = "$(STATUS)
  3264.         ifstr(i) $(STATUS) == YES
  3265.             LibraryProcedure STATUS, $(!LIBHANDLE), DelFile $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3266.             Debug-Output "Delfile Status = "$(STATUS)
  3267.         endif
  3268.         Debug-Output "Renaming from "$($)
  3269.         Debug-Output "Renaming to "$(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3270.         LibraryProcedure Status1 , $(!LIBHANDLE), RenFile $($), $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3271.         Debug-Output "Status is "$(Status1)
  3272.         AddFileToDeleteList $(!STF_WINDOWSSYSPATH)"\DRIVERS\"$(FileName)".old"
  3273.     EndForListDo
  3274.     exit
  3275. [CreateRasGroup]
  3276.     CreateCommonProgManGroup $(RasGroup) ""
  3277.     ShowCommonProgManGroup $(RasGroup), 1
  3278.     CreateCommonProgManItem $(RasGroup), $(RasPhone) +
  3279.                 "rasphone.exe" ""  0
  3280.     CreateCommonProgManItem $(RasGroup), $(RasMon) +
  3281.                 "rasmon.exe" ""  0
  3282.     CreateCommonProgManItem $(RasGroup), $(RasAdmin) +
  3283.                 "rasadmin.exe" ""  0
  3284.     CreateCommonProgManItem $(RasGroup), $(ReadMe) +
  3285.           "NOTEPAD.EXE "+
  3286.           "%SystemRoot%\system32\RAS\RASREAD.TXT" +
  3287.           "PROGMAN.EXE"  29
  3288.     CreateCommonProgManItem $(RasGroup), $(RasHelp) +
  3289.           "WINHLP32.EXE "+
  3290.           "RASPHONE.HLP" +
  3291.           "WINHLP32.EXE" 0
  3292.     CreateCommonProgManItem $(RasGroup), $(RasInternet) +
  3293.           "WINHLP32.EXE  -k internet RASPHONE.HLP "+
  3294.           "" +
  3295.           "%SystemRoot%\system32\RAS\RAS.ICO" 0
  3296.     ShowCommonProgManGroup $(RasGroup), 6
  3297.     exit
  3298. [RemoveRasGroup]
  3299.     Debug-Output "Removing icons from "$(RasGroup)
  3300.     CreateCommonProgManGroup $(RasGroup) ""
  3301.     RemoveCommonProgManGroup $(RasGroup)
  3302.     exit
  3303. [AddNDISWANToServiceGroupOrder]
  3304.     set GroupOrderName = "SYSTEM\CurrentControlSet\Control\ServiceGroupOrder"
  3305.     OpenRegKey $(!REG_H_LOCAL) "" $(GroupOrderName) $(!MAXIMUM_ALLOWED) KeyGroup
  3306.     set OldList = {}
  3307.     Ifstr(i) $(KeyGroup) != $(KeyNull)
  3308.         GetRegValue  $(KeyGroup) "List" TmpList
  3309.         ifint $(RegLastError) == 0
  3310.             ForListDo *($(TmpList), 4)
  3311.                 set OldList = >($(OldList), $($))
  3312.             EndForListDo
  3313.         endif
  3314.         Debug-Output "AddNDISWANToServiceGroupOrder current list "$(OldList)
  3315.         Ifcontains(i) "NDISWAN" not-in $(OldList)
  3316.             set NewGroupList = {}
  3317.             ForListDo $(OldList)
  3318.                 set NewGroupList = >($(NewGroupList), $($))
  3319.                 ifstr(i) $($) == "NDIS"
  3320.                     set NewGroupList = >($(NewGroupList), "NDISWAN" )
  3321.                 endif
  3322.             EndForListDo
  3323.             Debug-Output "AddNDISWANToServiceGroupOrder new list "$(NewGroupList)
  3324.             SetRegValue $(KeyGroup) {List, 0,$(!REG_VT_MULTI_SZ),$(NewGroupList)}
  3325.         endif
  3326.         CloseRegKey $(KeyGroup)
  3327.     else
  3328.         Debug-Output "AddNDISWANToServiceGroupOrder error opening ServiceGroupOrder key."
  3329.     endif
  3330.     return
  3331. [CheckRasInstalled]
  3332.     set MAXIMUM_ALLOWED   = 33554432
  3333.     set ProductKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\CurrentVersion"
  3334.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  3335.     Ifstr $(KeyProduct) != ""
  3336.         CloseRegKey $(KeyProduct)
  3337.         return "TRUE"
  3338.     else
  3339.         return "FALSE"
  3340. [QueryComponentsInstalled]
  3341.     Set Status            =    STATUS_FAILED
  3342.     Set ValueName         =    ""
  3343.     Set InstalledList     =    {}
  3344.     Set InstalledFlags    =    {}
  3345.     Set TmpList           =    {}
  3346.     Set KeyNull           =    ""
  3347.     Set NumberOfComps     =    0
  3348.     Set RasKeyName        =    $($0)
  3349.     Debug-Output "QueryComponentsInstalled: "$(RasKeyName)
  3350.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3351.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3352.         GetRegValue    $(KeyProduct) "RasComponents" TmpList
  3353.         Debug-Output "QueryComponentsInstalled: "$(TmpList)
  3354.         ForListDo *($(TmpList),4)
  3355.             set InstalledList = >($(InstalledList), $($))
  3356.         EndForListDo
  3357.         CloseRegKey $(KeyProduct)
  3358.         Ifcontains(i) "Server" in $(InstalledList)
  3359.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3360.         else
  3361.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3362.         endif
  3363.         Ifcontains(i) "Client" in $(InstalledList)
  3364.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3365.         else
  3366.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3367.         endif
  3368.         Ifcontains(i) "Admin" in $(InstalledList)
  3369.             Set InstalledFlags = >($(InstalledFlags), TRUE)
  3370.         else
  3371.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3372.         endif
  3373.         QueryListSize NumberOfComps $(InstalledList)
  3374.         ifint $(NumberOfComps) == 1
  3375.             Ifcontains(i) "Server" in $(InstalledList)
  3376.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3377.             else
  3378.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3379.             endif
  3380.             Ifcontains(i) "Client" in $(InstalledList)
  3381.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3382.             else
  3383.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3384.             endif
  3385.             Ifcontains(i) "Admin" in $(InstalledList)
  3386.                 Set InstalledFlags = >($(InstalledFlags), TRUE)
  3387.             else
  3388.                 Set InstalledFlags = >($(InstalledFlags), FALSE)
  3389.             endif
  3390.         else
  3391.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3392.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3393.             Set InstalledFlags = >($(InstalledFlags), FALSE)
  3394.         endif
  3395.         Set Status = STATUS_SUCCESSFUL
  3396.     Else
  3397.        Set Status = STATUS_NOT_FOUND
  3398.     EndIf
  3399.     Debug-Output "QueryComponentsInstalled: "$(InstalledList)
  3400.     Return $(Status) $(InstalledList) $(InstalledFlags)
  3401. [UpdateComponentsInstalled]
  3402.     Set Status          =    STATUS_FAILED
  3403.     Set InstalledList   =    $($0)
  3404.     Set RasKeyName      =    $($1)
  3405.     Set KeyNull         =    ""
  3406.     Debug-Output "UpdateComponentsInstalled: "$(RasKeyName)
  3407.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  3408.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  3409.         SetRegValue $(KeyProduct) {RasComponents, 0,$(!REG_VT_MULTI_SZ),$(InstalledList)}
  3410.         CloseRegKey $(KeyProduct)
  3411.         Set Status = STATUS_SUCCESSFUL
  3412.     else
  3413.         Set Status = STATUS_FAILED
  3414.     endif
  3415.     return $(Status)
  3416. [GetNetworkAccess]
  3417.     set Status          = STATUS_SUCCESSFUL
  3418.     Set KeyNull         = ""
  3419.     set NbfNetAccess   = 0
  3420.     set TcpIpNetAccess = 0
  3421.     set IpxNetAccess   = 0
  3422.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  3423.     Debug-Output "GetNetworkAccess entry"
  3424.     set ProtocolKeyName = $(RasProtocolsKeyName)"\NBF"
  3425.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3426.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3427.        GetRegValue $(KeyProtocol), "NetBiosGatewayEnabled" NetworkAccess
  3428.        ifint $(RegLastError) == 0
  3429.            set NbfNetAccess = *($(NetworkAccess), 4)
  3430.        endif
  3431.        CloseRegKey $(KeyProtocol)
  3432.     else
  3433.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3434.     endif
  3435.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IP"
  3436.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3437.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3438.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3439.        ifint $(RegLastError) == 0
  3440.            set TcpIpNetAccess = *($(NetworkAccess), 4)
  3441.        endif
  3442.        CloseRegKey $(KeyProtocol)
  3443.     else
  3444.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3445.     endif
  3446.     set ProtocolKeyName = $(RasProtocolsKeyName)"\IPX"
  3447.     OpenRegKey $(!REG_H_LOCAL) "" $(ProtocolKeyName) $(!MAXIMUM_ALLOWED) KeyProtocol
  3448.     Ifstr(i) $(KeyProtocol) != $(KeyNull)
  3449.        GetRegValue $(KeyProtocol), "AllowNetworkAccess" NetworkAccess
  3450.        ifint $(RegLastError) == 0
  3451.            set IpxNetAccess = *($(NetworkAccess), 4)
  3452.        endif
  3453.        CloseRegKey $(KeyProtocol)
  3454.     else
  3455.        Debug-Output "GetNetworkAccess:error opening key "$(ProtocolKeyName)
  3456.     endif
  3457.     Debug-Output "GetNetworkAccess exit"
  3458.     return $(Status) $(NbfNetAccess) $(TcpIpNetAccess) $(IpxNetAccess)
  3459. [IsNdisWanBHAdapterInstalled]
  3460.     set Status      = STATUS_FAILED
  3461.     Set KeyNull     = ""
  3462.     Debug-Output "IsNdisWanBHAdapterInstalled entry"
  3463.     set NetworkCardKey = $(KeyNull)
  3464.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  3465.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3466.         set NetcardsList = {}
  3467.         EnumRegKey $(NetworkCardKey) NetcardsList
  3468.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3469.            Debug-Output "IsNdisWanBHAdapterInstalled: EnumRegKey failed."
  3470.            goto IsNdisWanBHAdapterInstalledEnd
  3471.         endif
  3472.         ForListDo $(NetcardsList)
  3473.            set KeyName = *($($),1)
  3474.            set Card = $(KeyNull)
  3475.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  3476.            ifstr $(Card) == $(KeyNull)
  3477.                Debug-Output "IsNdisWanBHAdapterInstalled: could not open netcard key "$(KeyName)
  3478.            else
  3479.                GetRegValue $(Card), "ProductName" ProductNameInfo
  3480.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  3481.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName not found."
  3482.                else
  3483.                   set CardProductName = *($(ProductNameInfo), 4)
  3484.                   Debug-Output "IsNdisWanBHAdapterInstalled: ProductName. "$(CardProductName)
  3485.                   ifstr(i) $(CardProductName) == $(!ProductNDISWANName)
  3486.                        set Status = STATUS_SUCCESSFUL
  3487.                        CloseRegKey $(Card)
  3488.                        goto IsNdisWanBHAdapterInstalledEnd
  3489.                   endif
  3490.                endif
  3491.                CloseRegKey $(Card)
  3492.            endif
  3493.         EndForListDo
  3494.     else
  3495.         Debug-Output "IsNdisWanBHAdapterInstalled: failed to open "$(!NetworkCardKeyName)
  3496.     endif
  3497. IsNdisWanBHAdapterInstalledEnd =+
  3498.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  3499.         CloseRegKey $(NetworkCardKey)
  3500.     endif
  3501.     Debug-Output "IsNdisWanBHAdapterInstalled exit"
  3502.     Return $(Status)
  3503. [InstallNdisWanBHAdapter]
  3504.     set Status = STATUS_FAILED
  3505.     set Manufacturer = "Microsoft"
  3506.     set ProductInfName = "OEMNSVRA.INF"
  3507.     set ThisOption = NDISWAN
  3508.     Debug-Output "InstallNdisWanBHAdapter entry"
  3509.     Shell "utility.inf", AddHardwareComponent, +
  3510.           $(!Product$(ThisOption)Name),$(ProductInfName),+
  3511.           $(!Product$(ThisOption)KeyName)
  3512.     ifint $($R4) != -1
  3513.         Set !NETCARD_LIST = >($(!NETCARD_LIST), +
  3514.                              {$(!Product$(ThisOption)Name),+
  3515.                              $(!NetworkCardKeyName)"\"$($R4)})
  3516.     endif
  3517.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3518.        Debug-Output "InstallNdisWanBHAdapter:Shell error"
  3519.        goto InstallNdisWanBHAdapterEnd
  3520.     endif
  3521.     set RegistryErrorIndex = $($R0)
  3522.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3523.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3524.         CloseRegKey $($R1)
  3525.         CloseRegKey $($R2)
  3526.         CloseRegKey $($R3)
  3527.         goto InstallNdisWanBHAdapterEnd
  3528.     endif
  3529.     set KeyNetcard    = $($R1)
  3530.     set KeyParameters = $($R3)
  3531.     set KeyAdapterRules = $($R2)
  3532.     set AdapterNumber = $($R4)
  3533.     set NewValueList = +
  3534.         {{Manufacturer,$(NoTitle),$(!REG_VT_SZ),$(Manufacturer)},+
  3535.          {Title,$(NoTitle),$(!REG_VT_SZ),+
  3536.           "["$($R4)"] "$(!Product$(ThisOption)Title)},+
  3537.          {Description,$(NoTitle),$(!REG_VT_SZ),+
  3538.           $(!Product$(ThisOption)Description)},+
  3539.          {ProductName,$(NoTitle),$(!REG_VT_SZ),+
  3540.           $(!Product$(ThisOption)Name)},+
  3541.          {ServiceName,$(NoTitle),$(!REG_VT_SZ),$($R5)},+
  3542.          {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(!CurrentDate),1)},+
  3543.          {Hidden,$(NoTitle),$(!REG_VT_DWORD),1}}
  3544.     Shell  "utility.inf", AddValueList, $(KeyNetcard), $(NewValueList)
  3545.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3546.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3547.         goto InstallNdisWanBHAdapterEnd
  3548.     endif
  3549.     CloseRegKey $(KeyNetcard)
  3550.     set TempProdName = """"$(!Product$(ThisOption)Name)$(AdapterNumber)""""
  3551.     set TempBindForm = $(TempProdName)$(!NetRuleHardwareBHBindForm)
  3552.     set NewValueList = +
  3553.         {{type,$(NoTitle),$(!REG_VT_SZ),+
  3554.           $(!NetRuleHardwareBHType)},+
  3555.          {bindform,$(NoTitle),$(!REG_VT_SZ),$(TempBindForm)}, +
  3556.          {class,$(NoTitle),$(!REG_VT_MULTI_SZ),+
  3557.           $(!NetRuleHardwareBHClass)}, +
  3558.          {InfOption,$(NoTitle),$(!REG_VT_SZ),$(ThisOption)}, +
  3559.          {Infname ,$(NoTitle),$(!REG_VT_SZ),$(ProductInfName)}}
  3560.     Shell  "utility.inf", AddValueList, $(KeyAdapterRules), $(NewValueList)
  3561.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3562.         Debug-Output "InstallNdisWanBHAdapter: ShellCode error"
  3563.         goto InstallNdisWanBHAdapterEnd
  3564.     endif
  3565.     set RegistryErrorIndex = $($R0)
  3566.     Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3567.         Debug-Output "InstallNdisWanBHAdapter:Registry error: add hardware component"
  3568.         CloseRegKey $(KeyParameters)
  3569.         CloseRegKey $(KeyAdapterRules)
  3570.         goto InstallNdisWanBHAdapterEnd
  3571.     endif
  3572.     CloseRegKey $(KeyAdapterRules)
  3573.     CloseRegKey $(KeyParameters)
  3574.     set Status = STATUS_SUCCESSFUL
  3575. InstallNdisWanBHAdapterEnd =+
  3576.     Debug-Output "InstallNdisWanBHAdapter exit"
  3577.     return $(Status)
  3578. [InstallRasArpService]
  3579.     set Status = STATUS_SUCCESSFUL
  3580.     set KeyNull = ""
  3581.     Debug-Output "InstallRasArpService entry"
  3582.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3583.     Ifstr(i) $(KeyService) == $(KeyNull)
  3584.         Shell "utility.inf", CreateService, $(!ProductRASARPName), +
  3585.             $(!ProductRASARPDisplayName), +
  3586.             $(!ProductRASARPImagePath), +
  3587.             "kernel", "", {}, ""
  3588.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3589.             Debug-Output "OEMNSVRA.INF: InstallRasArpService : ShellCode error"
  3590.             return STATUS_FAILED
  3591.         endif
  3592.         set RegistryErrorIndex = $($R0)
  3593.         CloseRegKey $($R1)
  3594.         CloseRegKey $($R2)
  3595.         CloseRegKey $($R3)
  3596.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3597.             Debug-Output "OEMNSVRA.INF: InstallRasArpService: Registry error create service"
  3598.             return STATUS_FAILED
  3599.         endif
  3600.     endif
  3601.     Shell "" AddServiceDependency "TCPIP" $(!ProductRASARPName)
  3602.     ifstr(i) $($R0) == STATUS_FAILED
  3603.         Debug-Output "InstallRasArpService: error adding service dependency"
  3604.     endif
  3605.     Ifstr(i) $(KeyService) != $(KeyNull)
  3606.         CloseRegKey $(KeyService)
  3607.     endif
  3608.     Debug-Output "InstallRasArpService exit"
  3609.     return $(Status)
  3610. [RemoveRasArpService]
  3611.     set Status = STATUS_SUCCESSFUL
  3612.     set KeyNull = ""
  3613.     Debug-Output "RemoveRasArpService entry"
  3614.     OpenRegKey $(!REG_H_LOCAL) "" $(!RasArpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3615.     Ifstr(i) $(KeyService) != $(KeyNull)
  3616.         Shell "utility.inf", RemoveService $(!ProductRASARPName) "YES"
  3617.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3618.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService : ShellCode error"
  3619.             return STATUS_FAILED
  3620.         endif
  3621.         set RegistryErrorIndex = $($R0)
  3622.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3623.             Debug-Output "OEMNSVRA.INF: RemoveRasArpService: Registry error: "
  3624.             return STATUS_FAILED
  3625.         endif
  3626.         debug-output "Remove IP's RasArp dependency"
  3627.         Shell "" RemoveServiceDependency "TCPIP" $(!ProductRASARPName)
  3628.         ifstr(i) $($R0) == STATUS_FAILED
  3629.             Debug-Output "RemoveRasArpService: error removing service dependency"
  3630.         endif
  3631.         CloseRegKey $(KeyService)
  3632.     endif
  3633.     Debug-Output "RemoveRasArpService exit"
  3634.     return $(Status)
  3635. [InstallNdisTapiService]
  3636.     set Status = STATUS_SUCCESSFUL
  3637.     set KeyNull = ""
  3638.     Debug-Output "InstallNdisTapiService entry"
  3639.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3640.     Ifstr(i) $(KeyService) == $(KeyNull)
  3641.         Shell "utility.inf", CreateService, $(!ProductNDISTAPIName), +
  3642.             $(!ProductNDISTAPIDisplayName), +
  3643.             $(!ProductNDISTAPIImagePath), +
  3644.             "kernelauto", "NDIS", {}, ""
  3645.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3646.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService : ShellCode error"
  3647.             return STATUS_FAILED
  3648.         endif
  3649.         set RegistryErrorIndex = $($R0)
  3650.         set ParamKey = $($R2)
  3651.         CloseRegKey $($R1)
  3652.         CloseRegKey $($R3)
  3653.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3654.             Debug-Output "OEMNSVRA.INF: InstallNdisTapiService: Registry error create service"
  3655.             return STATUS_FAILED
  3656.         endif
  3657.         ifstr(i) $(!STF_PRODUCT) != "WINNT"
  3658.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 3072}
  3659.         else
  3660.             SetRegValue $(ParamKey) {AsyncEventQueueSize, 0, $(!REG_VT_DWORD), 768}
  3661.         endif
  3662.         CloseRegKey $(ParamKey)
  3663.     endif
  3664.     Ifstr(i) $(KeyService) != $(KeyNull)
  3665.         CloseRegKey $(KeyService)
  3666.     endif
  3667.     Debug-Output "InstallNdisTapiService exit"
  3668.     return $(Status)
  3669. [RemoveNdisTapiService]
  3670.     set Status = STATUS_SUCCESSFUL
  3671.     set KeyNull = ""
  3672.     Debug-Output "RemoveNdisTapiService entry"
  3673.     OpenRegKey $(!REG_H_LOCAL) "" $(!NdisTapiKeyName) $(!MAXIMUM_ALLOWED) KeyService
  3674.     Ifstr(i) $(KeyService) != $(KeyNull)
  3675.         Shell "utility.inf", RemoveService $(!ProductNDISTAPIName) "YES"
  3676.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3677.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService : ShellCode error"
  3678.             return STATUS_FAILED
  3679.         endif
  3680.         set RegistryErrorIndex = $($R0)
  3681.         Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  3682.             Debug-Output "OEMNSVRA.INF: RemoveNdisTapiService: Registry error: "
  3683.             return STATUS_FAILED
  3684.         endif
  3685.         CloseRegKey $(KeyService)
  3686.     endif
  3687.     Debug-Output "RemoveNdisTapiService exit"
  3688.     return $(Status)
  3689. [InstallNwlnkRipService]
  3690.     Debug-Output "InstallNwlnkRipService entry"
  3691.     set Status  = STATUS_FAILED
  3692.     set KeyNull = ""
  3693.     Set SrcDir  = $(!STF_SRCDIR)
  3694.     Ifstr(i) $(!STF_IDW) == TRUE
  3695.         set AddCopy  = NO
  3696.         set DoCopy   = NO
  3697.         set DoConfig = NO
  3698.     else
  3699.         set AddCopy  = YES
  3700.         set DoCopy   = YES
  3701.         set DoConfig = YES
  3702.     endif
  3703.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3704.     set !NTN_InstallMode = install
  3705.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3706.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3707.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3708.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3709.         Debug-Output "Error installing NWLNKRIP service"
  3710.         Goto InstallNwlnkRipServiceEnd
  3711.     Endif
  3712.     Set InstallStatus = $($R0)
  3713.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  3714.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  3715.             Debug-Output "InstallNwlnkRipService returned "$(InstallStatus)
  3716.             Goto InstallNwlnkRipServiceEnd
  3717.         Endif
  3718.     Endif
  3719.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3720.     ifstr(i) $($R0) == STATUS_FAILED
  3721.         Debug-Output "InstallNwlnkRipService: error adding service dependency"
  3722.     endif
  3723.     set Status = STATUS_SUCCESSFUL
  3724. InstallNwlnkRipServiceEnd =+
  3725.     Debug-Output "InstallNwlnkRipService exit"
  3726.     return $(Status)
  3727. [RemoveNwlnkRipService]
  3728.     Debug-Output "RemoveNwlnkRipService entry"
  3729.     set Status = STATUS_FAILED
  3730.     set KeyNull = ""
  3731.     Set SrcDir  = $(!STF_SRCDIR)
  3732.     Ifstr(i) $(!STF_IDW) == TRUE
  3733.         set AddCopy  = NO
  3734.         set DoCopy   = NO
  3735.         set DoConfig = NO
  3736.     else
  3737.         set AddCopy  = YES
  3738.         set DoCopy   = YES
  3739.         set DoConfig = YES
  3740.     endif
  3741.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3742.     set !NTN_InstallMode = deinstall
  3743.     Shell "oemnsvrr.inf" InstallOption $(!STF_LANGUAGE) "NWLNKRIP"  +
  3744.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3745.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3746.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3747.         Debug-Output "Error removing NWLNKRIP service"
  3748.         Goto RemoveNwlnkRipServiceEnd
  3749.     Endif
  3750.     Set RemoveStatus = $($R0)
  3751.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  3752.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  3753.             Debug-Output "RemoveNwlnkRipService returned "$(RemoveStatus)
  3754.             Goto RemoveNwlnkRipServiceEnd
  3755.         Endif
  3756.     Endif
  3757.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNRIPName)
  3758.     ifstr(i) $($R0) == STATUS_FAILED
  3759.         Debug-Output "RemoveNwlnkRipService: error removing service dependency"
  3760.     endif
  3761.     set Status = STATUS_SUCCESSFUL
  3762. RemoveNwlnkRipServiceEnd =+
  3763.     Debug-Output "RemoveNwlnkRipService exit"
  3764.     return $(Status)
  3765. [InstallIsnSapService]
  3766.     Debug-Output "InstallIsnSapService entry"
  3767.     set Status  = STATUS_FAILED
  3768.     set KeyNull = ""
  3769.     Set SrcDir  = $(!STF_SRCDIR)
  3770.     Ifstr(i) $(!STF_IDW) == TRUE
  3771.         set AddCopy  = NO
  3772.         set DoCopy   = NO
  3773.         set DoConfig = NO
  3774.     else
  3775.         set AddCopy  = YES
  3776.         set DoCopy   = YES
  3777.         set DoConfig = YES
  3778.     endif
  3779.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3780.     set !NTN_InstallMode = install
  3781.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  3782.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3783.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3784.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3785.         Debug-Output "Error installing SAP agent"
  3786.         Goto InstallIsnSapServiceEnd
  3787.     Endif
  3788.     Set InstallStatus = $($R0)
  3789.     Ifstr(i) $(InstallStatus) != STATUS_SUCCESSFUL
  3790.         Ifstr(i) $(InstallStatus) != STATUS_USERCANCEL
  3791.             Debug-Output "InstallSapService returned "$(InstallStatus)
  3792.             Goto InstallIsnSapServiceEnd
  3793.         Endif
  3794.     Endif
  3795.     Shell "" AddServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  3796.     ifstr(i) $($R0) == STATUS_FAILED
  3797.         Debug-Output "InstallIsnSapService: error adding service dependency"
  3798.     endif
  3799.     set Status = STATUS_SUCCESSFUL
  3800. InstallIsnSapServiceEnd =+
  3801.     Debug-Output "InstallIsnSapService exit"
  3802.     return $(Status)
  3803. [RemoveIsnSapService]
  3804.     Debug-Output "RemoveIsnSapService entry"
  3805.     set Status = STATUS_FAILED
  3806.     set KeyNull = ""
  3807.     Set SrcDir  = $(!STF_SRCDIR)
  3808.     Ifstr(i) $(!STF_IDW) == TRUE
  3809.         set AddCopy  = NO
  3810.         set DoCopy   = NO
  3811.         set DoConfig = NO
  3812.     else
  3813.         set AddCopy  = YES
  3814.         set DoCopy   = YES
  3815.         set DoConfig = YES
  3816.     endif
  3817.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  3818.     set !NTN_InstallMode = deinstall
  3819.     Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  3820.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "RAS"
  3821.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  3822.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3823.         Debug-Output "Error removing SAP agent"
  3824.         Goto RemoveIsnSapServiceEnd
  3825.     Endif
  3826.     Set RemoveStatus = $($R0)
  3827.     Ifstr(i) $(RemoveStatus) != STATUS_SUCCESSFUL
  3828.         Ifstr(i) $(RemoveStatus) != STATUS_USERCANCEL
  3829.             Debug-Output "RemoveIsnSapService returned "$(RemoveStatus)
  3830.             Goto RemoveIsnSapServiceEnd
  3831.         Endif
  3832.     Endif
  3833.     Shell "" RemoveServiceDependency "RemoteAccess" $(!ProductRASISNSAPName)
  3834.     ifstr(i) $($R0) == STATUS_FAILED
  3835.         Debug-Output "RemoveIsnSapService: error removing service dependency"
  3836.     endif
  3837.     set Status = STATUS_SUCCESSFUL
  3838. RemoveIsnSapServiceEnd =+
  3839.     Debug-Output "RemoveIsnSapService exit"
  3840.     return $(Status)
  3841. [WritePPPParameters]
  3842.     Debug-Output "WritePPPParameters: entry"
  3843.     Set Status = STATUS_FAILED
  3844.     set KeyNull = ""
  3845.     set RasManKeyName =  $(!NTN_ServiceBase)"\RasMan"
  3846.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  3847.     set RasProtocolsKeyName = $(!NTN_SoftwareBase)"\Microsoft\RAS\PROTOCOLS"
  3848.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManKeyName) $(!MAXIMUM_ALLOWED) KeyRasMan
  3849.     ifstr $(KeyRasMan) != $(KeyNull)
  3850.        OpenRegKey $(KeyRasMan) "" "PPP" $(!MAXIMUM_ALLOWED) KeyRasManPPP
  3851.        set NewValueList = {}
  3852.        ifstr $(KeyRasManPPP) != $(KeyNull)
  3853.            EnumRegValue $(KeyRasManPPP) NewValueList
  3854.        else
  3855.            CreateRegKey $(KeyRasMan) +
  3856.                    {"PPP",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyRasManPPP
  3857.            CloseRegKey $(KeyRasMan)
  3858.            ifstr $(KeyRasManPPP) == $(KeyNull)
  3859.                Debug-Output "WritePPPParameters: error creating RasMan\ppp key"
  3860.                goto WritePPPParametersEnd
  3861.            endif
  3862.        endif
  3863.     else
  3864.        Debug-Output "WritePPPParameters: error opening RasMan key"
  3865.        goto UpdateCPListEnd
  3866.     endif
  3867.     ifstr(i) $(NewValueList) == {}
  3868.         set NewValueList = {{MaxConfigure, 0, $(!REG_VT_DWORD), 10}, +
  3869.                             {MaxTerminate, 0, $(!REG_VT_DWORD), 2}, +
  3870.                             {MaxFailure,   0, $(!REG_VT_DWORD), 10}. +
  3871.                             {MaxReject,    0, $(!REG_VT_DWORD), 5}. +
  3872.                             {NegotiateTime, 0, $(!REG_VT_DWORD), 150}, +
  3873.                             {Logging, 0, $(!REG_VT_DWORD), 0}, +
  3874.                             {RestartTimer, 0, $(!REG_VT_DWORD), 3}}
  3875.     endif
  3876.     forlistdo $(NewValueList)
  3877.         SetRegValue $(KeyRasManPPP) $($)
  3878.     endforlistdo
  3879.     set ForceEncryptedPassword = 2
  3880.     set ForceEncryptedData     = 0
  3881.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolsKeyName) $(!MAXIMUM_ALLOWED) KeyRasProtocols
  3882.     ifstr $(KeyRasProtocols) != $(KeyNull)
  3883.         GetRegValue $(KeyRasProtocols) "ForceEncryptedPassword" ForceValue
  3884.         ifint $(RegLastError) == 0
  3885.             set ForceEncryptedPassword = *($(ForceValue), 4)
  3886.         endif
  3887.         GetRegValue $(KeyRasProtocols) "ForceEncryptedData" ForceValue
  3888.         ifint $(RegLastError) == 0
  3889.             set ForceEncryptedData = *($(ForceValue), 4)
  3890.         endif
  3891.         SetRegValue $(KeyRasManPPP) {ForceEncryptedPassword, 0, +
  3892.                                      $(!REG_VT_DWORD),$(ForceEncryptedPassword)}
  3893.         SetRegValue $(KeyRasManPPP) {ForceEncryptedData, 0, +
  3894.                                      $(!REG_VT_DWORD),$(ForceEncryptedData)}
  3895.         CloseRegKey $(KeyRasProtocols)
  3896.     endif
  3897.     CloseRegKey $(KeyRasManPPP)
  3898.     set Status = STATUS_SUCCESSFUL
  3899. WritePPPParametersEnd =+
  3900.     Debug-Output "WritePPPParameters: exit"
  3901.     return $(Status)
  3902. [UpdateCPList]
  3903.     Debug-Output "UpdateCPList: entry"
  3904.     Set Status = STATUS_FAILED
  3905.     set KeyNull = ""
  3906.     set RasManPPPKeyName =  $(!NTN_ServiceBase)"\RasMan\PPP"
  3907.     Shell "" WritePPPParameters
  3908.     Shell "" QuerySelectedProtocols
  3909.     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  3910.         set fNetbeuiSelected   = $($R1)
  3911.         set fTcpIpSelected     = $($R2)
  3912.         set fIpxSelected       = $($R3)
  3913.         set fNetbeuiAllowed    = $($R4)
  3914.         set fTcpIpAllowed      = $($R5)
  3915.         set fIpxAllowed        = $($R6)
  3916.     else
  3917.         Debug-Output "UpdateCPList: error QuerySelectedProtocols"
  3918.         goto UpdateCPListEnd
  3919.     endif
  3920.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManPPPKeyName) $(!MAXIMUM_ALLOWED) KeyRasManPPP
  3921.     ifstr $(KeyRasManPPP) != $(KeyNull)
  3922.         EnumRegKey $(KeyRasManPPP) OldCPList
  3923.         ifstr(i) $(fNetbeuiSelected) == TRUE
  3924.             set fNetbeuiChosen = TRUE
  3925.         else
  3926.             set fNetbeuiChosen = $(fNetbeuiAllowed)
  3927.         endif
  3928.         ifstr(i) $(fTcpIpSelected) == TRUE
  3929.             set fTcpIpChosen = TRUE
  3930.         else
  3931.             set fTcpIpChosen = $(fTcpIpAllowed)
  3932.         endif
  3933.         ifstr(i) $(fIpxSelected) == TRUE
  3934.             set fIpxChosen = TRUE
  3935.         else
  3936.             set fIpxChosen = $(fIpxAllowed)
  3937.         endif
  3938.         set CPList = {"PAP", "CHAP", "SPAP", "CBCP", "COMPCP"}
  3939.         ifstr(i) $(fNetbeuiChosen) == TRUE
  3940.             set CPList = >($(CPList), "NBFCP")
  3941.         endif
  3942.         ifstr(i) $(fTcpIpChosen) == TRUE
  3943.             set CPList = >($(CPList), "IPCP")
  3944.         endif
  3945.         ifstr(i) $(fIpxChosen) == TRUE
  3946.             set CPList = >($(CPList), "IPXCP")
  3947.         endif
  3948.         set CurrentCPList = {}
  3949.         ForListDo $(OldCPList)
  3950.            set CPName = *($($),1)
  3951.            ifcontains(i) $(CPName) not-in $(CPList)
  3952.                DeleteRegTree $(KeyRasManPPP) $(CPName)
  3953.            else
  3954.                set CurrentCPList = >($(CurrentCPList), $(CPName))
  3955.            endif
  3956.         EndForListDo
  3957.         forlistdo $(CPList)
  3958.             ifcontains(i) $($) not-in $(CurrentCPList)
  3959.                 CreateRegKey $(KeyRasManPPP) +
  3960.                          {$($),0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyCp
  3961.                 set path = #(CP-List, $($), 1)
  3962.                 set NewValueList = {{Path, 0, $(!REG_VT_EXPAND_SZ), $(path)}}
  3963.                 ifstr $(KeyCp) != $(KeyNull)
  3964.                     Shell  "utility.inf", AddValueList, $(KeyCp), +
  3965.                                                               $(NewValueList)
  3966.                     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  3967.                         Debug-Output "UpdateCPList:AddValueList bombed out"
  3968.                         goto UpdateCPListEnd
  3969.                     endif
  3970.                     set RegistryErrorIndex = $($R0)
  3971.                     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  3972.                         goto UpdateCPListEnd
  3973.                     endif
  3974.                     CloseRegKey $(KeyCp)
  3975.                 else
  3976.                     Debug-Output "UpdateCPList:error creating key"
  3977.                 endif
  3978.             endif
  3979.         endforlistdo
  3980.         CloseRegKey $(KeyRasManPPP)
  3981.     else
  3982.         Debug-Output "UpdateCPList:error opening RASMAN\PPP key"
  3983.         goto UpdateCPListEnd
  3984.     endif
  3985.     set Status = STATUS_SUCCESSFUL
  3986. UpdateCPListEnd =+
  3987.     Debug-Output "UpdateCPList: exit"
  3988.     return $(Status)
  3989. [UpdateLLInterface]
  3990.     Debug-Output "UpdateLLInterface: entry"
  3991.     set Status = STATUS_FAILED
  3992.     set KeyNull = ""
  3993.     set LLInterface = "\Device\RASARP"
  3994.     set IPLinkageKeyName = $(!NTN_ServiceBase)"\TCPIP\Linkage"
  3995.     OpenRegKey $(!REG_H_LOCAL) "" $(IPLinkageKeyName) $(!MAXIMUM_ALLOWED) KeyIpLinkage
  3996.     ifstr $(KeyIpLinkage) == $(KeyNull)
  3997.        Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't open IP Linkage key"
  3998.        goto UpdateLLInterfaceEnd
  3999.     endif
  4000.     set NdisWanList = {}
  4001.     GetRegValue    $(KeyIpLinkage) "Bind" TmpList
  4002.     ForListDo *($(TmpList),4)
  4003.         Split-String $($), "\", BindList
  4004.         QueryListSize ListSize $(BindList)
  4005.         set ServiceName = *($(BindList), $(ListSize))
  4006.         LibraryProcedure Result $(!LIBHANDLE) SetupStrncmp $(ServiceName) "NdisWan" 7
  4007.         ifint $(Result) == 0
  4008.         set NdisWanList = >($(NdisWanList), $(ServiceName))
  4009.         endif
  4010.     EndForListDo
  4011.     CloseRegKey $(KeyIpLinkage)
  4012.     QueryListSize ListSize $(NdisWanList)
  4013.     ifint $(ListSize) >= 1
  4014.     ForListDo $(NdisWanList)
  4015.         set ServiceKeyName = $(!NTN_ServiceBase)"\"$($)"\Parameters\TCPIP"
  4016.         OpenRegKey $(!REG_H_LOCAL) "" $(ServiceKeyName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  4017.         ifstr $(KeyNdisWan) != $(KeyNull)
  4018.             SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4019.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4020.             SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4021.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4022.             SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4023.                               $(!REG_VT_MULTI_SZ), {""}}
  4024.             SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4025.                                          $(!REG_VT_SZ), $(LLInterface)}
  4026.             SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4027.                                           $(!REG_VT_DWORD), 0}
  4028.         else
  4029.             CreateRegKey $(!REG_H_LOCAL) +
  4030.                          {$(ServiceKeyName),0,GenericClass} "" +
  4031.                           $(!MAXIMUM_ALLOWED) "" KeyNdisWan
  4032.             ifstr $(KeyNdisWan) != $(KeyNull)
  4033.                 SetRegValue $(KeyNdisWan) {IPAddress, 0, +
  4034.                                       $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4035.                 SetRegValue $(KeyNdisWan) {SubnetMask, 0, +
  4036.                               $(!REG_VT_MULTI_SZ), {"0.0.0.0"}}
  4037.                 SetRegValue $(KeyNdisWan) {DefaultGateway, 0, +
  4038.                               $(!REG_VT_MULTI_SZ), {""}}
  4039.                 SetRegValue $(KeyNdisWan) {LLInterface, 0,+
  4040.                                           $(!REG_VT_SZ), $(LLInterface)}
  4041.                 SetRegValue $(KeyNdisWan) {EnableDHCP, 0, +
  4042.                                           $(!REG_VT_DWORD), 0}
  4043.                 SetRegValue $(KeyNdisWan) {UseZeroBroadcast, 0, +
  4044.                                           $(!REG_VT_DWORD), 0}
  4045.            else
  4046.                Debug-Output "OEMNSVRA.INF:UpdateLLInterface: couldn't create NdisWan params-tcpip key"
  4047.                goto UpdateLLInterfaceEnd
  4048.            endif
  4049.         endif
  4050.         CloseRegKey $(KeyNdisWan)
  4051.         EndForListDo
  4052.     endif
  4053.     set Status = STATUS_SUCCESSFUL
  4054. UpdateLLInterfaceEnd =+
  4055.     Debug-Output "UpdateLLInterface: exit"
  4056.     return $(Status)
  4057. [UpdateNetGroupDependency]
  4058.     Set  Status = STATUS_SUCCESSFUL
  4059.     set  KeyNull = ""
  4060.     set  fNetbeuiInstalled  = $($0)
  4061.     set  fTcpIpInstalled    = $($1)
  4062.     set  fIpxInstalled      = $($2)
  4063.     Debug-Output "UpdateNetGroupDependency entry"
  4064.     set ServiceList =  {}
  4065.     ifstr(i) $(fNetbeuiInstalled) == TRUE
  4066.         set ServiceList = >($(ServiceList), "nbf")
  4067.     endif
  4068.     ifstr(i) $(fTcpIpInstalled) == TRUE
  4069.         set ServiceList = >($(ServiceList), "tcpip")
  4070.     endif
  4071.     ifstr(i) $(fIpxInstalled) == TRUE
  4072.         set ServiceList = >($(ServiceList), "nwlnkipx")
  4073.     endif
  4074.     ForListDo $(ServiceList)
  4075.         set Service = $($)
  4076.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4077.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4078.                    $(!MAXIMUM_ALLOWED) KeyService
  4079.         ifstr $(KeyService) != $(KeyNull)
  4080.             set newGroupList = {"+NDIS", "+NDISWAN"}
  4081.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4082.             ifint $(RegLastError) == 0
  4083.                 Debug-Output "UpdateNetGroupDependency: old group List "*($(GrpList), 4)
  4084.                 ForListDo *($(GrpList),4)
  4085.                     ifstr(i) $($) != "NDIS"
  4086.                         ifstr(i) $($) != "NDISWAN"
  4087.                             set newGroup = "+"$($)
  4088.                             set newGroupList = >($(newGroupList), $(newGroup))
  4089.                         endif
  4090.                     endif
  4091.                 EndForListDo
  4092.             endif
  4093.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4094.             ifint $(RegLastError) == 0
  4095.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4096.                 ForListDo *($(ServiceList),4)
  4097.                     set newGroupList = >($(newGroupList), $($))
  4098.                 EndForListDo
  4099.             endif
  4100.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4101.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4102.             CloseRegKey $(KeyService)
  4103.         else
  4104.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4105.         endif
  4106.     EndForListDo
  4107.     Debug-Output "UpdateNetGroupDependency exit"
  4108.     return $(Status)
  4109. [RemoveNetGroupDependency]
  4110.     Set  Status = STATUS_SUCCESSFUL
  4111.     set  KeyNull = ""
  4112.     set  fNetbeuiInstalled  = $($0)
  4113.     set  fTcpIpInstalled    = $($1)
  4114.     set  fIpxInstalled      = $($2)
  4115.     Debug-Output "UpdateNetGroupDependency entry"
  4116.     set ServiceList =  {"nbf", "tcpip", "nwlnkipx"}
  4117.     ForListDo $(ServiceList)
  4118.         set Service = $($)
  4119.         Debug-Output "OEMNSVRA.INF: Changing group dependency of "$(Service)
  4120.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\"$(Service) +
  4121.                    $(!MAXIMUM_ALLOWED) KeyService
  4122.         ifstr $(KeyService) != $(KeyNull)
  4123.             set newGroupList = {}
  4124.             GetRegValue    $(KeyService) "DependOnGroup" GrpList
  4125.             ifint $(RegLastError) == 0
  4126.                 Debug-Output "UpdateNetGroupDependency: old List "*($(GrpList), 4)
  4127.                 ForListDo *($(GrpList),4)
  4128.                     ifstr(i) $($) != "NDISWAN"
  4129.                         set newGroup = "+"$($)
  4130.                         set newGroupList = >($(newGroupList), $(newGroup))
  4131.                     endif
  4132.                 EndForListDo
  4133.             endif
  4134.             GetRegValue $(KeyService) "DependOnService" ServiceList
  4135.             ifint $(RegLastError) == 0
  4136.                 Debug-Output "UpdateNetGroupDependency: old service List "*($(ServiceList), 4)
  4137.                 ForListDo *($(ServiceList),4)
  4138.                     set newGroupList = >($(newGroupList), $($))
  4139.                 EndForListDo
  4140.             endif
  4141.             Debug-Output "OEMNSVRA.INF: UpdateNetGroupDependency: new depend List "$(newGroupList)
  4142.             LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(Service) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newGroupList), "", "", ""
  4143.             CloseRegKey $(KeyService)
  4144.         else
  4145.             Debug-Output "UpdateNetGroupDependency: failed to open service linkage key"$(Service)
  4146.         endif
  4147.     EndForListDo
  4148.     Debug-Output "UpdateNetGroupDependency exit"
  4149.     return $(Status)
  4150. [UpdateIPRouterInfo]
  4151.     set EnableRouter = $($0)
  4152.     set KeyNull      = ""
  4153.     Debug-Output "UpdateIPRouterInfo entry"
  4154.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\TCPIP\parameters" $(!MAXIMUM_ALLOWED) KeyIpParams
  4155.     ifstr $(KeyIpParams) != $(KeyNull)
  4156.         SetRegValue $(KeyIpParams) {IPEnableRouter, 0,+
  4157.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4158.         CloseRegKey $(KeyIpParams)
  4159.     endif
  4160.     Debug-Output "UpdateIPRouterInfo exit"
  4161.     return STATUS_SUCCESSFUL
  4162. [UpdateIPXRouterInfo]
  4163.     set Status = STATUS_FAILED
  4164.     set EnableRouter = $($0)
  4165.     set KeyNull      = ""
  4166.     Debug-Output "UpdateIPXRouterInfo entry"
  4167.     OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX\NetConfig" $(!MAXIMUM_ALLOWED) KeyIpxNetConfig
  4168.     ifstr $(KeyIpxNetConfig) != $(KeyNull)
  4169.         EnumRegKey $(KeyIpxNetConfig) DriverList
  4170.         ForListDo $(DriverList)
  4171.            set DriverName = *($($),1)
  4172.            OpenRegKey $(KeyIpxNetConfig) "" $(DriverName) $(!MAXIMUM_ALLOWED) Driver
  4173.            ifstr $(Driver) == $(KeyNull)
  4174.                Debug-Output "UpdateIPXRouterInfo: could not open key ipx\netconfig\"$(DriverName)
  4175.                CloseRegKey $(KeyIpxNetConfig)
  4176.                return $(Status)
  4177.            endif
  4178.            SetRegValue $(Driver) {EnableWanRouter, 0,+
  4179.                                     $(!REG_VT_DWORD), $(EnableRouter)}
  4180.            CloseRegKey $(Driver)
  4181.         EndForListDo
  4182.         CloseRegKey $(KeyIpxNetConfig)
  4183.         set Status = STATUS_SUCCESSFUL
  4184.     else
  4185.         Debug-Output "UpdateIPXRouterInfo: error opening ipx\netconfig key"
  4186.     endif
  4187.     Debug-Output "UpdateIPXRouterInfo exit"
  4188.     return $(Status)
  4189. [IsNetcardInstalled]
  4190.     Set Status                = STATUS_FAILED
  4191.     Set fNetcardInstalled     = FALSE
  4192.     Set KeyNull               = ""
  4193.     set ProductRASASYMACName     = "AsyncMac"
  4194.     set NetworkCardKey = $(KeyNull)
  4195.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) NetworkCardKey
  4196.     Ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4197.         set NetcardsList = {}
  4198.         EnumRegKey $(NetworkCardKey) NetcardsList
  4199.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4200.            Debug-Output "IsNetcardInstalled: EnumRegKey failed."
  4201.            goto IsNetcardInstalledEnd
  4202.         endif
  4203.         ForListDo $(NetcardsList)
  4204.            set KeyName = *($($),1)
  4205.            set Card = $(KeyNull)
  4206.            OpenRegKey $(NetworkCardKey) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  4207.            ifstr $(Card) == $(KeyNull)
  4208.                Debug-Output "IsNetcardInstalled: could not open netcard key "$(KeyName)
  4209.            else
  4210.                GetRegValue $(Card), "ProductName" ProductNameInfo
  4211.                Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  4212.                   Debug-Output "IsNetcardInstalled: ProductName not found."
  4213.                else
  4214.                   set CardProductName = *($(ProductNameInfo), 4)
  4215.                   Debug-Output "IsNetcardInstalled: ProductName. "$(CardProductName)
  4216.                   ifstr(i) $(CardProductName) != $(!ProductNDISWANName)
  4217.                    ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINName)
  4218.                     ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTName)
  4219.                      ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINIPName)
  4220.                       ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALOUTIPName)
  4221.                        ifstr(i) $(CardProductName) != $(!ProductNDISWANDIALINOUTIPXName)
  4222.                         ifstr(i) $(CardProductName) != $(ProductRASASYMACName)
  4223.                          ifstr(i) $(CardProductName) != $(!ProductPCIMACName)
  4224.                            GetRegValue $(Card), "Manufacturer" Manufacturer
  4225.                            Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  4226.                              ifstr(i) *($(Manufacturer), 4) != "Digiboard"
  4227.                                Debug-Output "found installed netcard"
  4228.                                set fNetcardInstalled = TRUE
  4229.                                set Status = STATUS_SUCCESSFUL
  4230.                                CloseRegKey $(Card)
  4231.                                goto IsNetcardInstalledEnd
  4232.                              endif
  4233.                            endif
  4234.                          endif
  4235.                         endif
  4236.                        endif
  4237.                       endif
  4238.                      endif
  4239.                     endif
  4240.                    endif
  4241.                   endif
  4242.                endif
  4243.                CloseRegKey $(Card)
  4244.            endif
  4245.         EndForListDo
  4246.     else
  4247.         Debug-Output "IsNetcardInstalled: failed to open "$(!NetworkCardKeyName)
  4248.     endif
  4249. IsNetcardInstalledEnd =+
  4250.     ifstr(i) $(NetworkCardKey) != $(KeyNull)
  4251.         CloseRegKey $(NetworkCardKey)
  4252.     endif
  4253.     Return $(Status) $(fNetcardInstalled)
  4254. [IsNetworkConfigured]
  4255.     set WkstaKeyName   = $(!NTN_ServiceBase)"\LanmanWorkstation"
  4256.     set SrvrKeyName    = $(!NTN_ServiceBase)"\LanmanServer"
  4257.     Set KeyNull        =    ""
  4258.     Set status = STATUS_FAILED
  4259.     Set WkstaConfigured  = FALSE
  4260.     Set SrvrConfigured   = FALSE
  4261.     Debug-Output "IsNetworkConfigured WkstaKeyName "$(WkstaKeyName)
  4262.     set KeyProduct = $(KeyNull)
  4263.     OpenRegKey $(!REG_H_LOCAL) "" $(WkstaKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4264.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4265.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4266.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4267.         ifint $(DeleteFlag) != 1
  4268.             set WkstaConfigured = TRUE
  4269.         endif
  4270.         CloseRegKey $(KeyProduct)
  4271.     endif
  4272.     Debug-Output "IsNetworkConfigured SrvrKeyName "$(SrvrKeyName)
  4273.     set KeyProduct = $(KeyNull)
  4274.     OpenRegKey $(!REG_H_LOCAL) "" $(SrvrKeyName) $(!MAXIMUM_ALLOWED) KeyProduct
  4275.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  4276.         GetRegValue $(KeyProduct),"DeleteFlag", DeleteFlagInfo
  4277.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4278.         ifint $(DeleteFlag) != 1
  4279.             set SrvrConfigured = TRUE
  4280.         endif
  4281.         CloseRegKey $(KeyProduct)
  4282.     endif
  4283.     set status = STATUS_SUCCESSFUL
  4284.     Debug-Output "IsNetworkConfigured exit"
  4285.     Return $(status) $(WkstaConfigured) $(SrvrConfigured)
  4286. [QueryInstalledProtocols]
  4287.     Debug-Output "QueryInstalledProtocols entry "
  4288.     set NbfKeyName        = $(!NTN_ServiceBase)"\Nbf"
  4289.     set TcpIpKeyName      = $(!NTN_ServiceBase)"\TcpIp"
  4290.     set IpxKeyName        = $(!NTN_ServiceBase)"\NWLNKIPX"
  4291.     set AppleTalkKeyName  = $(!NTN_ServiceBase)"\AppleTalk"
  4292.     Set KeyNull        =    ""
  4293.     Set status = STATUS_FAILED
  4294.     Set NbfInstalled     = FALSE
  4295.     Set TcpIpInstalled   = FALSE
  4296.     Set IpxInstalled     = FALSE
  4297.     Set AppleTalkInstalled = FALSE
  4298.     set KeyService = $(KeyNull)
  4299.     set DeleteFlag = 0
  4300.     set DeleteFlagInfo = {}
  4301.     OpenRegKey $(!REG_H_LOCAL) "" $(NbfKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4302.     Ifstr(i) $(KeyService) != $(KeyNull)
  4303.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4304.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4305.         ifint $(DeleteFlag) != 1
  4306.             set NbfInstalled = TRUE
  4307.         endif
  4308.         CloseRegKey $(KeyService)
  4309.     endif
  4310.     set KeyService = $(KeyNull)
  4311.     set DeleteFlag = 0
  4312.     set DeleteFlagInfo = {}
  4313.     OpenRegKey $(!REG_H_LOCAL) "" $(TcpIpKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4314.     Ifstr(i) $(KeyService) != $(KeyNull)
  4315.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4316.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4317.         ifint $(DeleteFlag) != 1
  4318.             set TcpIpInstalled = TRUE
  4319.         endif
  4320.         CloseRegKey $(KeyService)
  4321.     endif
  4322.     set KeyService = $(KeyNull)
  4323.     set DeleteFlag = 0
  4324.     set DeleteFlagInfo = {}
  4325.     OpenRegKey $(!REG_H_LOCAL) "" $(IpxKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4326.     Ifstr(i) $(KeyService) != $(KeyNull)
  4327.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4328.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4329.         ifint $(DeleteFlag) != 1
  4330.             set IpxInstalled = TRUE
  4331.         endif
  4332.         CloseRegKey $(KeyService)
  4333.     endif
  4334.     set KeyService = $(KeyNull)
  4335.     set DeleteFlag = 0
  4336.     set DeleteFlagInfo = {}
  4337.     OpenRegKey $(!REG_H_LOCAL) "" $(AppleTalkKeyName) $(!MAXIMUM_ALLOWED) KeyService
  4338.     Ifstr(i) $(KeyService) != $(KeyNull)
  4339.         GetRegValue $(KeyService),"DeleteFlag", DeleteFlagInfo
  4340.         set DeleteFlag = *($(DeleteFlagInfo), 4)
  4341.         ifint $(DeleteFlag) != 1
  4342.             set AppleTalkInstalled = TRUE
  4343.         endif
  4344.         CloseRegKey $(KeyService)
  4345.     endif
  4346.     set status = STATUS_SUCCESSFUL
  4347.     Debug-Output "QueryInstalledProtocols exit"
  4348.     Return $(status) $(NbfInstalled) $(TcpIpInstalled) $(IpxInstalled) +
  4349.                      $(AppleTalkInstalled)
  4350. [ProtocolInfo]
  4351.     NETBEUI               = "OEMNXPNB.INF", "NBF", 1
  4352.     TCPIP                 = "OEMNXPTC.INF", "TC", 2
  4353.     IPX                   = "OEMNXPIP.INF", "NWLNKIPX", 3
  4354. [InstallProtocol]
  4355.     Set Status                = STATUS_FAILED
  4356.     Set KeyNull               = ""
  4357.     set Protocol              = $($0)
  4358.     Debug-Output "OEMNSVRA.INF: Label: InstallProtocol"
  4359.     Set AdapterSrcDir    = $(!STF_SRCDIR)
  4360.     Set ThisInfName = #(ProtocolInfo, $(Protocol), 1)
  4361.     Set InfOption = #(ProtocolInfo, $(Protocol), 2)
  4362.     Set BbIndex = #(ProtocolInfo, $(Protocol), 3)
  4363.     Debug-Output "OEMNSVRA.INF: Installing "$(ThisInfName)
  4364.     Ifint $(BbIndex) != 0
  4365.         read-syms Billboard$(BbIndex)$(!STF_LANGUAGE)
  4366.         Shell "subroutn.inf" PushBillboard NETSTATUSDLG $(Status)
  4367.         Set BillboardVisible = 1
  4368.     Else-ifint $(BillboardVisible) != 0
  4369.         Shell "subroutn.inf" PopBillboard
  4370.         Set BillboardVisible = 0
  4371.     Endif
  4372.     Ifstr(i) $(!STF_IDW) == TRUE
  4373.         set AddCopy  = NO
  4374.         set DoCopy   = NO
  4375.         set DoConfig = NO
  4376.     else
  4377.         set AddCopy  = YES
  4378.         set DoCopy   = YES
  4379.         set DoConfig = YES
  4380.     endif
  4381.     set InvokedByRas = YES
  4382.     set SaveNTN_InstallMode = $(!NTN_InstallMode)
  4383.     set SaveSTF_INSTALL_MODE = $(!STF_INSTALL_MODE)
  4384.     set !NTN_InstallMode = install
  4385.     set !STF_INSTALL_MODE = EXPRESS
  4386.     Shell $(ThisInfName) InstallOption $(!STF_LANGUAGE) $(InfOption) $(AdapterSrcDir) $(AddCopy) $(DoCopy) $(DoConfig) $(InvokedByRas)
  4387.     set !NTN_InstallMode = $(SaveNTN_InstallMode)
  4388.     set !STF_INSTALL_MODE = $(SaveSTF_INSTALL_MODE)
  4389.     Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4390.         Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" SHELL ERROR!"
  4391.         Goto InstallProtocolEscape
  4392.     Endif
  4393.     Set InstallProtocolStatus = $($R0)
  4394.     Ifstr(i) $(InstallProtocolStatus) != STATUS_SUCCESSFUL
  4395.         Ifstr(i) $(InstallProtocolStatus) != STATUS_USERCANCEL
  4396.             Debug-Output "OEMNSVRA.INF: INF "$(ThisInfName)" returned "$(InstallProtocolStatus)
  4397.             Goto InstallProtocolEscape
  4398.         Endif
  4399.     Endif
  4400. InstallProtocolEscape = +
  4401.     set Status = $(InstallProtocolStatus)
  4402.     return $(Status)
  4403. [UpgradeSelectedProtocols]
  4404.     Debug-Output "UpgradeSelectedProtocols entry."
  4405.     set Status   = STATUS_FAILED
  4406.     Set KeyNull  = ""
  4407.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4408.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4409.     set RasServiceParmName =  $(!NTN_ServiceBase)"\Remoteaccess\Parameters"
  4410.     set AsyMacServiceParmName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  4411.     set RasManPPPName = $(!NTN_ServiceBase)"\RasMan\PPP"
  4412.     set GtwyEnabled = 1
  4413.     OpenRegKey $(!REG_H_LOCAL) "" $(RasServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4414.     ifstr $(KeyParam) != $(KeyNull)
  4415.         GetRegValue $(KeyParam), "NetBiosGatewayEnabled", GtwyEnabledList
  4416.         ifint $(RegLastError) == 0
  4417.             set GtwyEnabled = *($(GtwyEnabledList), 4)
  4418.         endif
  4419.         CloseRegKey $(KeyParam)
  4420.     else
  4421.         Debug-Output "UpgradeSelectedProtocols: error opening RemoteAccess\Parameters key"
  4422.     endif
  4423.     set DialinNBF    = 0
  4424.     set DialinIP     = 0
  4425.     set DialoutNBF   = 0
  4426.     set DialoutIP    = 0
  4427.     set DialinoutIPX = 0
  4428.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyMacServiceParmName) $(!MAXIMUM_ALLOWED) KeyParam
  4429.     ifstr $(KeyParam) != $(KeyNull)
  4430.         GetRegValue $(KeyParam), "DialinNBF", DialinNBFList
  4431.         ifint $(RegLastError) == 0
  4432.             set DialinNBF = *($(DialinNBFList), 4)
  4433.         endif
  4434.         GetRegValue $(KeyParam), "DialinIP", DialinIPList
  4435.         ifint $(RegLastError) == 0
  4436.             set DialinIP = *($(DialinIPList), 4)
  4437.         endif
  4438.         GetRegValue $(KeyParam), "DialoutNBF", DialoutNBFList
  4439.         ifint $(RegLastError) == 0
  4440.             set DialoutNBF = *($(DialoutNBFList), 4)
  4441.         endif
  4442.         GetRegValue $(KeyParam), "DialoutIP", DialoutIPList
  4443.         ifint $(RegLastError) == 0
  4444.             set DialoutIP = *($(DialoutIPList), 4)
  4445.         endif
  4446.         GetRegValue $(KeyParam), "DialinoutIPX", DialinoutIPXList
  4447.         ifint $(RegLastError) == 0
  4448.             set DialinoutIPX = *($(DialinoutIPXList), 4)
  4449.         endif
  4450.         CloseRegKey $(KeyParam)
  4451.     else
  4452.         Debug-Output "UpgradeSelectedProtocols: error opening AsyncMac\Parameters key"
  4453.     endif
  4454.     set fDownLevel = FALSE
  4455.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4456.     ifstr $(RasProtocolKey) == $(KeyNull)
  4457.         set fDownLevel = TRUE
  4458.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4459.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4460.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4461.         CloseRegKey $(RasKey)
  4462.     endif
  4463.     ifstr $(RasProtocolKey) != $(KeyNull)
  4464.         set NetbeuiSelected = 0
  4465.         set NetbeuiAllowed  = 0
  4466.         set TcpIpSelected = 0
  4467.         set TcpIpAllowed = 0
  4468.         set IpxSelected = 0
  4469.         set IpxAllowed = 0
  4470.         ifint $(DialoutNBF) != 0
  4471.             set NetbeuiSelected = 1
  4472.         endif
  4473.         ifint $(GtwyEnabled) == 1
  4474.           ifint $(DialinNBF) != 0
  4475.             set NetbeuiAllowed = 1
  4476.           endif
  4477.         else
  4478.           ifint $(DialoutNBF) != 0
  4479.             set NetbeuiAllowed = 1
  4480.           endif
  4481.         endif
  4482.         ifstr(i) $(fDownLevel) != TRUE
  4483.           ifint $(DialoutIP) != 0
  4484.             set TcpIpSelected = 1
  4485.           endif
  4486.           ifint $(DialinIP) != 0
  4487.             set TcpIpAllowed = 1
  4488.           endif
  4489.           ifint $(DialinoutIPX) != 0
  4490.             set IpxSelected = 1
  4491.             set IpxAllowed  = 1
  4492.           endif
  4493.         endif
  4494.         SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4495.                                        $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4496.         SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4497.                                        $(!REG_VT_DWORD),$(TcpIpSelected)}
  4498.         SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4499.                                        $(!REG_VT_DWORD),$(IpxSelected)}
  4500.         SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4501.                                        $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4502.         SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4503.                                        $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4504.         SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4505.                                        $(!REG_VT_DWORD),$(IpxAllowed)}
  4506.         OpenRegKey $(RasProtocolKey) "" "NBF" $(!MAXIMUM_ALLOWED) NbfKey
  4507.         ifstr $(NbfKey) == $(KeyNull)
  4508.             CreateRegKey $(RasProtocolKey) {"NBF",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" NbfKey
  4509.             SetRegValue $(NbfKey) {NetBiosGatewayEnabled, 0,+
  4510.                                        $(!REG_VT_DWORD),$(GtwyEnabled)}
  4511.             CloseRegKey $(NbfKey)
  4512.         endif
  4513.         ifstr(i) $(fDownLevel) != TRUE
  4514.             OpenRegKey $(RasProtocolKey) "" "IP" $(!MAXIMUM_ALLOWED) IpKey
  4515.             ifstr $(IpKey) != $(KeyNull)
  4516.                 SetRegValue $(IpKey) {AllowNetworkAccess, 0,+
  4517.                                            $(!REG_VT_DWORD),$(GtwyEnabled)}
  4518.                 CloseRegKey $(IpKey)
  4519.             endif
  4520.             OpenRegKey $(RasProtocolKey) "" "IPX" $(!MAXIMUM_ALLOWED) IpxKey
  4521.             ifstr $(IpxKey) != $(KeyNull)
  4522.                 SetRegValue $(IpxKey) {AllowNetworkAccess, 0,+
  4523.                                            $(!REG_VT_DWORD),$(GtwyEnabled)}
  4524.                 CloseRegKey $(IpxKey)
  4525.             endif
  4526.         endif
  4527.         set ForceEncryptedPassword = 2
  4528.         set ForceEncryptedData = 0
  4529.         ifstr(i) $(fDownLevel) != TRUE
  4530.             GetRegValue $(RasProtocolKey), "ForceEncryptedData", DataList
  4531.             ifint $(RegLastError) != 0
  4532.                 GetRegValue $(RasProtocolKey), "ForceEncryptedPassword", PasswdList
  4533.                 ifint $(RegLastError) == 0
  4534.                    set ForceEncryptedPassword = *($(PasswdList), 4)
  4535.                    ifint $(ForceEncryptedPassword) == 1
  4536.                        set ForceEncryptedPassword = 2
  4537.                    endif
  4538.                 endif
  4539.             else
  4540.                 goto  UpgradeSelectedProtocolsEnd
  4541.             endif
  4542.         endif
  4543.         SetRegValue $(RasProtocolKey) {ForceEncryptedPassword, 0,+
  4544.                                  $(!REG_VT_DWORD), $(ForceEncryptedPassword)}
  4545.         SetRegValue $(RasProtocolKey) {ForceEncryptedData, 0,+
  4546.                                  $(!REG_VT_DWORD), $(ForceEncryptedData)}
  4547. UpgradeSelectedProtocolsEnd =+
  4548.         CloseRegKey $(RasProtocolKey)
  4549.         set Status = STATUS_SUCCESSFUL
  4550.     else
  4551.         Debug-Output "UpgradeSelectedProtocols: error opening Ras\protocols key"
  4552.     endif
  4553.     Debug-Output "UpgradeSelectedProtocols exit."
  4554.     return $(Status)
  4555. [SaveSelectedProtocols]
  4556.     Debug-Output "SaveSelectedProtocols entry."
  4557.     set Status   = STATUS_FAILED
  4558.     Set KeyNull  = ""
  4559.     ifstr(i) $($0) == TRUE
  4560.         set NetbeuiSelected = 1
  4561.     else
  4562.         set NetbeuiSelected = 0
  4563.     endif
  4564.     ifstr(i) $($1) == TRUE
  4565.         set TcpIpSelected = 1
  4566.     else
  4567.         set TcpIpSelected = 0
  4568.     endif
  4569.     ifstr(i) $($2) == TRUE
  4570.         set IpxSelected = 1
  4571.     else
  4572.         set IpxSelected = 0
  4573.     endif
  4574.     ifstr(i) $($3) == TRUE
  4575.         set NetbeuiAllowed = 1
  4576.     else
  4577.         set NetbeuiAllowed = 0
  4578.     endif
  4579.     ifstr(i) $($4) == TRUE
  4580.         set TcpIpAllowed = 1
  4581.     else
  4582.         set TcpIpAllowed = 0
  4583.     endif
  4584.     ifstr(i) $($5) == TRUE
  4585.         set IpxAllowed = 1
  4586.     else
  4587.         set IpxAllowed = 0
  4588.     endif
  4589.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4590.     set RasProtocolName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4591.     OpenRegKey $(!REG_H_LOCAL) "" $(RasProtocolName) $(!MAXIMUM_ALLOWED) RasProtocolKey
  4592.     ifstr $(RasProtocolKey) == $(KeyNull)
  4593.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4594.         CreateRegKey $(RasKey) {"Protocols",0,GenericClass} "" $(!MAXIMUM_ALLOWED) "" RasProtocolKey
  4595.         OpenRegKey $(RasKey) "" "Protocols" $(!MAXIMUM_ALLOWED) RasProtocolKey
  4596.         CloseRegKey $(RasKey)
  4597.     endif
  4598.     ifstr $(RasProtocolKey) != $(KeyNull)
  4599.         SetRegValue $(RasProtocolKey) {fNetbeuiSelected, 0,+
  4600.                                        $(!REG_VT_DWORD),$(NetbeuiSelected)}
  4601.         SetRegValue $(RasProtocolKey) {fTcpIpSelected, 0,+
  4602.                                        $(!REG_VT_DWORD),$(TcpIpSelected)}
  4603.         SetRegValue $(RasProtocolKey) {fIpxSelected, 0,+
  4604.                                        $(!REG_VT_DWORD),$(IpxSelected)}
  4605.         SetRegValue $(RasProtocolKey) {fNetbeuiAllowed, 0,+
  4606.                                        $(!REG_VT_DWORD),$(NetbeuiAllowed)}
  4607.         SetRegValue $(RasProtocolKey) {fTcpIpAllowed, 0,+
  4608.                                        $(!REG_VT_DWORD),$(TcpIpAllowed)}
  4609.         SetRegValue $(RasProtocolKey) {fIpxAllowed, 0,+
  4610.                                        $(!REG_VT_DWORD),$(IpxAllowed)}
  4611.         CloseRegKey $(RasProtocolKey)
  4612.         set Status = STATUS_SUCCESSFUL
  4613.     else
  4614.         Debug-Output "error opening Ras\protocols key"
  4615.     endif
  4616.     Debug-Output "SaveSelectedProtocols exit."
  4617.     return $(Status)
  4618. [QuerySelectedProtocols]
  4619.     Debug-Output "QuerySelectedProtocols: entry"
  4620.     set Status   = STATUS_FAILED
  4621.     Set KeyNull  = ""
  4622.     set fNetbeuiSelected = FALSE
  4623.     set fTcpIpSelected   = FALSE
  4624.     set fIpxSelected     = FALSE
  4625.     set fNetbeuiAllowed  = FALSE
  4626.     set fTcpIpAllowed    = FALSE
  4627.     set fIpxAllowed      = FALSE
  4628.     set NetbeuiSelected  = {}
  4629.     set TcpIpSelected    = {}
  4630.     set IpxSelected      = {}
  4631.     set NetbeuiAllowed  = {}
  4632.     set TcpIpAllowed    = {}
  4633.     set IpxAllowed      = {}
  4634.     set RasKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  4635.     OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) $(!MAXIMUM_ALLOWED) RasKey
  4636.     ifstr $(RasKey) != $(KeyNull)
  4637.         GetRegValue $(RasKey), "fNetbeuiSelected", NetbeuiSelected
  4638.         ifint *($(NetbeuiSelected), 4) == 1
  4639.             set fNetbeuiSelected = TRUE
  4640.         else
  4641.             set fNetbeuiSelected = FALSE
  4642.         endif
  4643.         GetRegValue $(RasKey), "fTcpIpSelected", TcpIpSelected
  4644.         ifint *($(TcpIpSelected), 4) == 1
  4645.             set fTcpIpSelected = TRUE
  4646.         else
  4647.             set fTcpIpSelected = FALSE
  4648.         endif
  4649.         GetRegValue $(RasKey), "fIpxSelected", IpxSelected
  4650.         ifint *($(IpxSelected), 4) == 1
  4651.             set fIpxSelected = TRUE
  4652.         else
  4653.             set fIpxSelected = FALSE
  4654.         endif
  4655.         GetRegValue $(RasKey), "fNetbeuiAllowed", NetbeuiAllowed
  4656.         ifint *($(NetbeuiAllowed), 4) == 1
  4657.             set fNetbeuiAllowed = TRUE
  4658.         else
  4659.             set fNetbeuiAllowed = FALSE
  4660.         endif
  4661.         GetRegValue $(RasKey), "fTcpIpAllowed", TcpIpAllowed
  4662.         ifint *($(TcpIpAllowed), 4) == 1
  4663.             set fTcpIpAllowed = TRUE
  4664.         else
  4665.             set fTcpIpAllowed = FALSE
  4666.         endif
  4667.         GetRegValue $(RasKey), "fIpxAllowed", IpxAllowed
  4668.         ifint *($(IpxAllowed), 4) == 1
  4669.             set fIpxAllowed = TRUE
  4670.         else
  4671.             set fIpxAllowed = FALSE
  4672.         endif
  4673.         CloseRegKey $(RasKey)
  4674.         set Status = STATUS_SUCCESSFUL
  4675.     else
  4676.         Debug-Output "error opening Ras\protocols key"
  4677.     endif
  4678.     Debug-Output "QuerySelectedProtocols: exit"
  4679.     return $(Status) $(fNetbeuiSelected) $(fTcpIpSelected) $(fIpxSelected) +
  4680.                      $(fNetbeuiAllowed) $(fTcpIpAllowed) $(fIpxAllowed)
  4681. [UpdateSelectedProtocols]
  4682.     Debug-Output "UpdateSelectedProtocols: entry"
  4683.     set Status   = STATUS_FAILED
  4684.     Shell "" QuerySelectedProtocols
  4685.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4686.         Debug-Output "error shelling QuerySelectedProtocols."
  4687.         goto UpdateSelectedProtocolsEnd
  4688.     endif
  4689.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4690.         Debug-Output "error returned by QuerySelectedProtocols."
  4691.         goto UpdateSelectedProtocolsEnd
  4692.     endif
  4693.     set fNetbeuiSelected = $($R1)
  4694.     set fTcpIpSelected   = $($R2)
  4695.     set fIpxSelected     = $($R3)
  4696.     set fNetbeuiAllowed = $($R4)
  4697.     set fTcpIpAllowed   = $($R5)
  4698.     set fIpxAllowed     = $($R6)
  4699.     Debug-Output "UpdateSelectedProtocols: Selected protocols NBF IP IPX "$(fNetbeuiSelected)" "$(fTcpIpSelected)" "$(fIpxSelected)
  4700.     shell "" QueryInstalledProtocols
  4701.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4702.         Debug-Output "error shelling QueryInstalledProtocols."
  4703.         goto UpdateSelectedProtocolsEnd
  4704.     endif
  4705.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4706.         Debug-Output "error returned by QueryInstalledProtocols."
  4707.         goto UpdateSelectedProtocolsEnd
  4708.     endif
  4709.     set fNetbeuiInstalled = $($R1)
  4710.     set fTcpIpInstalled   = $($R2)
  4711.     set fIpxInstalled     = $($R3)
  4712.     Debug-Output "UpdateSelectedProtocols: Installed Protocols NBF IP IPX "$(fNetbeuiInstalled)" "$(fTcpIpInstalled)" "$(fIpxInstalled)
  4713.     set fNetbeuiSelectedNew = $(fNetbeuiSelected)
  4714.     set fTcpIpSelectedNew   = $(fTcpIpSelected)
  4715.     set fIpxSelectedNew     = $(fIpxSelected)
  4716.     set fNetbeuiAllowedNew = $(fNetbeuiAllowed)
  4717.     set fTcpIpAllowedNew   = $(fTcpIpAllowed)
  4718.     set fIpxAllowedNew     = $(fIpxAllowed)
  4719.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  4720.         set fNetbeuiChosen = TRUE
  4721.     else
  4722.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  4723.     endif
  4724.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  4725.         set fTcpIpChosen = TRUE
  4726.     else
  4727.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  4728.     endif
  4729.     ifstr(i) $(fIpxSelectedNew) == TRUE
  4730.         set fIpxChosen = TRUE
  4731.     else
  4732.         set fIpxChosen = $(fIpxAllowedNew)
  4733.     endif
  4734.     ifstr(i) $(fNetbeuiInstalled) == FALSE
  4735.         set fNetbeuiSelectedNew = FALSE
  4736.         set fNetbeuiAllowedNew = FALSE
  4737.     endif
  4738.     ifstr(i) $(fTcpIpInstalled) == FALSE
  4739.         set fTcpIpSelectedNew = FALSE
  4740.         set fTcpIpAllowedNew = FALSE
  4741.     endif
  4742.     ifstr(i) $(fIpxInstalled) == FALSE
  4743.         set fIpxSelectedNew = FALSE
  4744.         set fIpxAllowedNew = FALSE
  4745.     endif
  4746.     ifstr(i) $(fNetbeuiSelectedNew) == $(fNetbeuiSelected)
  4747.       ifstr(i) $(fTcpIpSelectedNew) == $(fTcpIpSelected)
  4748.         ifstr(i) $(fIpxSelectedNew) == $(fIpxSelected)
  4749.           ifstr(i) $(fNetbeuiAllowedNew) == $(fNetbeuiAllowed)
  4750.             ifstr(i) $(fTcpIpAllowedNew) == $(fTcpIpAllowed)
  4751.               ifstr(i) $(fIpxAllowedNew) == $(fIpxAllowed)
  4752.                 set Status = STATUS_SUCCESSFUL
  4753.                 Debug-Output "UpdateSelectedProtocols: Nothing changed"
  4754.                 goto UpdateSelectedProtocolsEnd
  4755.               endif
  4756.             endif
  4757.           endif
  4758.         endif
  4759.       endif
  4760.     endif
  4761.     Shell "" SaveSelectedProtocols $(fNetbeuiSelectedNew) $(fTcpIpSelectedNew) +
  4762.                                    $(fIpxSelectedNew) $(fNetbeuiAllowedNew) +
  4763.                                    $(fTcpIpAllowedNew) $(fIpxAllowedNew)
  4764.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4765.         Debug-Output "error shelling SaveSelectedProtocols."
  4766.         goto UpdateSelectedProtocolsEnd
  4767.     endif
  4768.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4769.         Debug-Output "error returned by SaveSelectedProtocols."
  4770.         goto UpdateSelectedProtocolsEnd
  4771.     endif
  4772.     ifstr(i) $(fNetbeuiSelectedNew) == TRUE
  4773.         set fNetbeuiChosen = TRUE
  4774.     else
  4775.         set fNetbeuiChosen = $(fNetbeuiAllowedNew)
  4776.     endif
  4777.     ifstr(i) $(fTcpIpSelectedNew) == TRUE
  4778.         set fTcpIpChosen = TRUE
  4779.     else
  4780.         set fTcpIpChosen = $(fTcpIpAllowedNew)
  4781.     endif
  4782.     ifstr(i) $(fIpxSelectedNew) == TRUE
  4783.         set fIpxChosen = TRUE
  4784.     else
  4785.         set fIpxChosen = $(fIpxAllowedNew)
  4786.     endif
  4787.     Shell "" UpdateNetCardInfo $(fNetbeuiChosen) $(fTcpIpChosen) +
  4788.                                $(fIpxChosen)
  4789.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  4790.         Debug-Output "error shelling UpdateNetCardInfo."
  4791.         goto UpdateSelectedProtocolsEnd
  4792.     endif
  4793.     Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  4794.         Debug-Output "error returned by UpdateNetCardInfo."
  4795.         goto UpdateSelectedProtocolsEnd
  4796.     endif
  4797.     set Status = STATUS_SUCCESSFUL
  4798.     ifstr(i) $(fNbfChosen) == FALSE
  4799.         Debug-Output "UpdateSelectedProtocols: Removing RemoteAccess NBF dependency"
  4800.         Shell "" RemoveServiceDependency "RemoteAccess" "NBF"
  4801.     endif
  4802.     ifstr(i) $(fTcpIpChosen) == FALSE
  4803.         Debug-Output "UpdateSelectedProtocols: Removing RasArp service"
  4804.         shell "" RemoveRasArpService
  4805.     endif
  4806.     ifstr(i) $(fIpxChosen) == FALSE
  4807.         Debug-Output "UpdateSelectedProtocols: Removing IPX router and SAP"
  4808.         shell "" RemoveNwlnkRipService
  4809.         shell "" RemoveIsnSapService
  4810.         Shell "" RemoveServiceDependency "RemoteAccess" "NWLNKIPX"
  4811.         ifstr(i) $($R0) == STATUS_FAILED
  4812.             Debug-Output "UpdateSelectedProtocols: error removing service dependency of RemoteAccess on NWLNKIPX"
  4813.         endif
  4814.     endif
  4815. UpdateSelectedProtocolsEnd = +
  4816.     Debug-Output "UpdateSelectedProtocols: exit"
  4817.     return $(Status) $(fNetbeuiChosen) $(fTcpIpChosen) $(fIpxChosen)
  4818. [UpgradeIsdnInfo]
  4819.     Debug-Output "UpgradeIsdnInfo entry."
  4820.     set Status   = STATUS_FAILED
  4821.     Set KeyNull  = ""
  4822.     set RasKeyName      =  $(!NTN_SoftwareBase)"\Microsoft\Ras"
  4823.     set TapiName        =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Tapi Devices"
  4824.     set RasIsdnName     =  $(!NTN_SoftwareBase)"\Microsoft\Ras\MEDIA\ISDN"
  4825.     set RasManParamName =  $(!NTN_ServiceBase)"\RasMan\Parameters"
  4826.     set PcimacName      =  "HARDWARE\DEVICEMAP\TAPI DEVICES\PCIMAC"
  4827.     set KeyIsdn = $(KeyNull)
  4828.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIsdnName) $(!MAXIMUM_ALLOWED) KeyIsdn
  4829.     ifstr $(KeyIsdn) != $(KeyNull)
  4830.         EnumRegKey $(KeyIsdn) PortList
  4831.         ifint $(RegLastError) != 0
  4832.             Debug-Output "UpgradeIsdnInfo: error enumerating MEDIAS\ISDN key."
  4833.             CloseRegKey $(KeyIsdn)
  4834.             set Status = STATUS_SUCCESSFUL
  4835.             goto UpgradeIsdnInfoEnd
  4836.         endif
  4837.         QueryListSize IsdnPorts $(PortList)
  4838.         ifint $(IsdnPorts) == 0
  4839.             set Status = STATUS_SUCCESSFUL
  4840.             CloseRegKey $(KeyIsdn)
  4841.             goto UpgradeIsdnInfoEnd
  4842.         endif
  4843.         set MediaType = "ISDN"
  4844.         set Addresses = {}
  4845.         OpenRegKey $(!REG_H_LOCAL) "" $(PcimacName) +
  4846.                                                $(!MAXIMUM_ALLOWED) KeyPcimac
  4847.         ifstr $(KeyPcimac) != $(KeyNull)
  4848.             GetRegValue $(KeyPcimac), "Address", AddressList
  4849.             ifint $(RegLastError) == 0
  4850.                 set Addresses = *($(AddressList), 4)
  4851.             endif
  4852.             GetRegValue $(KeyPcimac), "Media Type", MediaValue
  4853.             ifint $(RegLastError) == 0
  4854.                 set MediaType = *($(MediaValue), 4)
  4855.             endif
  4856.             CloseRegKey $(KeyPcimac)
  4857.         else
  4858.             Debug-Output "UpgradeIsdnInfo: error opening DEVICEMAP\TAPI DEVICES\PCIMAC key."
  4859.             CloseRegKey $(KeyIsdn)
  4860.             goto UpgradeIsdnInfoEnd
  4861.         endif
  4862.         set AddressList = {}
  4863.         set NameList    = {}
  4864.         set UsageList   = {}
  4865.         set index = 1
  4866.         forlistdo $(PortList)
  4867.            set Address =  *($(Addresses), $(index))
  4868.            set-add index = $(index) , 1
  4869.            set AddressList = >($(AddressList), $(Address))
  4870.            set PortName = *($($), 1)
  4871.            set NameList = >($(NameList), Pcimac$(PortName))
  4872.            OpenRegKey $(KeyIsdn) "" $(PortName) $(!MAXIMUM_ALLOWED) KeyPort
  4873.            ifstr $(KeyPort) != $(KeyNull)
  4874.              GetRegValue $(KeyPcimac), "Usage", UsageValue
  4875.              ifint $(RegLastError) == 0
  4876.                  set Usage = *($(UsageValue), 4)
  4877.                  set UsageList = >($(UsageList), $(Usage))
  4878.              else
  4879.                 Debug-Output "UpgradeIsdnInfo: error reading usage "$(PortName)
  4880.                 set UsageList = >($(UsageList), "Client")
  4881.              endif
  4882.              CloseRegKey $(KeyPort)
  4883.            else
  4884.              Debug-Output "UpgradeIsdnInfo: error opening key "$(PortName)
  4885.              set UsageList = >($(UsageList), "Client")
  4886.            endif
  4887.         endforlistdo
  4888.         set KeyTapi = $(KeyNull)
  4889.         CreateRegKey $(!REG_H_LOCAL) +
  4890.                  {$(TapiName),$(NoTitle),GenericClass}  +
  4891.                   "" $(!MAXIMUM_ALLOWED) "" KeyTapi
  4892.         ifstr $(KeyTapi) != $(KeyNull)
  4893.             CreateRegKey $(KeyTapi) +
  4894.                  {"Pcimac" ,$(NoTitle),GenericClass} +
  4895.                  "" $(!MAXIMUM_ALLOWED) "" KeyPcimac
  4896.             ifstr $(KeyPcimac) != $(KeyNull)
  4897.                 Debug-Output "UpgradeIsdnInfo: MediaType "$(MediaType)
  4898.                 Debug-Output "UpgradeIsdnInfo: Addresses "$(AddressList)
  4899.                 Debug-Output "UpgradeIsdnInfo: Names  "$(NameList)
  4900.                 Debug-Output "UpgradeIsdnInfo: Usage  "$(UsageList)
  4901.                 SetRegValue $(KeyPcimac) {"Media Type", 0, +
  4902.                                    $(!REG_VT_SZ),$(MediaType)}
  4903.                 SetRegValue $(KeyPcimac) {"Address", 0, +
  4904.                                    $(!REG_VT_MULTI_SZ),$(AddressList)}
  4905.                 SetRegValue $(KeyPcimac) {"Friendly Name", 0, +
  4906.                                    $(!REG_VT_MULTI_SZ),$(NameList)}
  4907.                 SetRegValue $(KeyPcimac) {"Usage", 0, +
  4908.                                    $(!REG_VT_MULTI_SZ),$(UsageList)}
  4909.                 CloseRegKey $(KeyPcimac)
  4910.             else
  4911.                 Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES\Pcimac key"
  4912.             endif
  4913.         else
  4914.              Debug-Output "UpgradeIsdnInfo: error creating RAS\TAPI DEVICES key"
  4915.         endif
  4916.         CloseRegKey $(KeyIsdn)
  4917.         OpenRegKey $(!REG_H_LOCAL) "" $(RasKeyName) +
  4918.                                       $(!MAXIMUM_ALLOWED) KeyRas
  4919.         ifstr $(KeyRas) != $(KeyNull)
  4920.             DeleteRegTree $(KeyRas) "Media"
  4921.             CloseRegKey $(KeyRas)
  4922.         endif
  4923.         set KeyRasman = $(KeyNull)
  4924.         OpenRegKey $(!REG_H_LOCAL) "" $(RasManParamName) +
  4925.                                       $(!MAXIMUM_ALLOWED) KeyRasman
  4926.         ifstr $(KeyRasman) != $(KeyNull)
  4927.            GetRegValue $(KeyRasman), "Medias", MediaList
  4928.            ifint $(RegLastError) == 0
  4929.                set Medias = *($(MediaList), 4)
  4930.            else
  4931.                Debug-Output "UpgradeIsdnInfo: error reading Medias value "
  4932.            endif
  4933.            set NewMedias = {}
  4934.            forlistdo $(Medias)
  4935.                ifstr(i) $($) != "ISDN"
  4936.                   set NewMedias = >($(NewMedias), $($))
  4937.                endif
  4938.            endforlistdo
  4939.            set NewMedias = >($(NewMedias), "rastapi")
  4940.            Debug-Output "UpgradeIsdnInfo: NewMedias "$(NewMedias)
  4941.            SetRegValue $(KeyRasman) {"Medias", 0, +
  4942.                                    $(!REG_VT_MULTI_SZ),$(NewMedias)}
  4943.            CloseRegKey $(KeyRasman)
  4944.         else
  4945.           Debug-Output "UpgradeIsdnInfo: error opening Services\Rasman\Parameters key"
  4946.           goto UpgradeIsdnInfoEnd
  4947.         endif
  4948.         set Status = STATUS_SUCCESSFUL
  4949.     else
  4950.         set Status = STATUS_SUCCESSFUL
  4951.     endif
  4952. UpgradeIsdnInfoEnd = +
  4953.     Debug-Output "UpgradeIsdnInfo exit."
  4954.     return $(Status)
  4955. [UpdateNetCardInfo]
  4956.     Debug-Output "UpdateNetCardInfo: entry"
  4957.     set Status   = STATUS_FAILED
  4958.     Set KeyNull  = ""
  4959.     set Manufacturer  = "Microsoft"
  4960.     set fNetbeuiChosen = $($0)
  4961.     set fTcpIpChosen   = $($1)
  4962.     set fIpxChosen     = $($2)
  4963.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  4964.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  4965.     ifstr $(KeyNetcards) == $(KeyNull)
  4966.          Debug-Output "UpdateNetCardInfo: could not open Netcards key"
  4967.          goto UpdateNetCardInfoEnd
  4968.     endif
  4969.     EnumRegKey $(KeyNetcards) NetcardsList
  4970.     set RemoveList  = {}
  4971.     ForListDo $(NetcardsList)
  4972.        set KeyName = *($($),1)
  4973.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  4974.        ifstr $(Card) == $(KeyNull)
  4975.            Debug-Output "OEMNSVRA.INF: could not open netcard key"
  4976.            CloseRegKey $(KeyNetcards)
  4977.            goto UpdateNetCardInfoEnd
  4978.        endif
  4979.        GetRegValue $(Card), "ProductName" ProductNameInfo
  4980.        set CardProductName = *($(ProductNameInfo), 4)
  4981.        ifstr(i) $(fNetbeuiChosen) == FALSE
  4982.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINName)
  4983.               set RemoveList = >($(RemoveList), +
  4984.                  {$(!ProductNDISWANName),+
  4985.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  4986.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTName)
  4987.               set RemoveList = >($(RemoveList), +
  4988.                  {$(!ProductNDISWANName),+
  4989.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  4990.            endif
  4991.        endif
  4992.        ifstr(i) $(fTcpIpChosen) == FALSE
  4993.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINIPName)
  4994.               set RemoveList = >($(RemoveList), +
  4995.                  {$(!ProductNDISWANName),+
  4996.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  4997.        else-ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALOUTIPName)
  4998.               set RemoveList = >($(RemoveList), +
  4999.                  {$(!ProductNDISWANName),+
  5000.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5001.            endif
  5002.        endif
  5003.        ifstr(i) $(fIpxChosen) == FALSE
  5004.        ifstr(i) $(CardProductName) == $(!ProductNDISWANDIALINOUTIPXName)
  5005.               set RemoveList = >($(RemoveList), +
  5006.                  {$(!ProductNDISWANName),+
  5007.                                  $(!NetworkCardKeyName)"\"$(KeyName)})
  5008.            endif
  5009.        endif
  5010.        CloseRegKey $(Card)
  5011.     EndForListDo
  5012.     CloseRegKey $(KeyNetcards)
  5013.     QueryListSize NetCards $(RemoveList)
  5014.     ifint $(NetCards) != 0
  5015.         ForListDo  $(RemoveList)
  5016.             debug-output "Removing hardware component: "$($)
  5017.             Shell "utility.inf", RemoveHardwareComponent, +
  5018.                                  $(Manufacturer), *($($),1), *($($),2)
  5019.         EndForListDo
  5020.     endif
  5021.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5022.     ifstr $(KeyMacParams) == $(KeyNull)
  5023.        Debug-Output "UpdateNetCardInfo: could not open AsyncMac Params key"
  5024.        goto UpdateNetCardInfoEnd
  5025.     endif
  5026.     set NewValueList = {}
  5027.     ifstr(i) $(fNetbeuiChosen) == FALSE
  5028.         set NewValueList =  >($(NewValueList), +
  5029.                              {DialinNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5030.         set NewValueList = >($(NewValueList), +
  5031.                              {DialoutNBF, $(NoTitle), $(!REG_VT_DWORD), 0})
  5032.     endif
  5033.     ifstr(i) $(fTcpIpChosen) == FALSE
  5034.         set NewValueList = >($(NewValueList), +
  5035.                             {DialinIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5036.         set NewValueList = >($(NewValueList), +
  5037.                             {DialoutIP, $(NoTitle), $(!REG_VT_DWORD), 0 })
  5038.     endif
  5039.     ifstr(i) $(fIpxChosen) == FALSE
  5040.         set NewValueList = >($(NewValueList), +
  5041.                             {DialinoutIPX, $(NoTitle), $(!REG_VT_DWORD), 0})
  5042.     endif
  5043.     Shell  "utility.inf", AddValueList, $(KeyMacParams), $(NewValueList)
  5044.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5045.          Debug-Output "UpdateNetCardInfo:AddValueList bombed out"
  5046.          goto UpdateNetCardInfoEnd
  5047.     endif
  5048.     set RegistryErrorIndex = $($R0)
  5049.     CloseRegKey $(KeyMacParams)
  5050.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5051.         goto UpdateNetCardInfoEnd
  5052.     endif
  5053.     set Status = STATUS_SUCCESSFUL
  5054. UpdateNetCardInfoEnd =+
  5055.     Debug-Output "UpdateNetcardInfo: Exit"
  5056.     return $(Status)
  5057. [UpdateNdisWanInfo]
  5058.     Debug-Output "UpdateNdisWanNetInfo: entry"
  5059.     set Status   = STATUS_FAILED
  5060.     Set KeyNull  = ""
  5061.     set NdisWanName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion"
  5062.     set NdisWanRulesName = $(!NTN_SoftwareBase)"\Microsoft\NdisWan\CurrentVersion\NetRules"
  5063.     set NdisWanSvcName = $(!NTN_ServiceBase)"\NdisWan"
  5064.     set RasManLinkageName = $(!NTN_ServiceBase)"\RasMan\Linkage"
  5065.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanName) $(!MAXIMUM_ALLOWED) KeyNdisWan
  5066.     ifstr $(KeyNdisWan) != $(KeyNull)
  5067.         SetRegValue $(KeyNdisWan) {Description, 0, +
  5068.                 $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5069.         SetRegValue $(KeyNdisWan) {PathName, 0, +
  5070.                 $(!REG_VT_SZ),$(!ProductNDISWANImagePath)}
  5071.         SetRegValue $(KeyNdisWan) {ServiceName, 0, +
  5072.                 $(!REG_VT_SZ),$(!ProductNDISWANName)}
  5073.         SetRegValue $(KeyNdisWan) {Title, 0, +
  5074.                 $(!REG_VT_SZ),$(!ProductNDISWANTitle)}
  5075.         CloseRegKey $(KeyNdisWan)
  5076.     else
  5077.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan key"
  5078.     endif
  5079.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5080.     ifstr $(KeyRules) != $(KeyNull)
  5081.         SetRegValue $(KeyRules) {bindable, 0, +
  5082.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANBindable)}
  5083.         SetRegValue $(KeyRules) {bindform, 0, +
  5084.                 $(!REG_VT_SZ),$(!NetRuleNDISWANBindForm)}
  5085.         SetRegValue $(KeyRules) {class, 0, +
  5086.                 $(!REG_VT_MULTI_SZ),$(!NetRuleNDISWANClass)}
  5087.         SetRegValue $(KeyRules) {type, 0, +
  5088.                 $(!REG_VT_SZ),$(!NetRuleNDISWANType)}
  5089.         SetRegValue $(KeyRules) {InfOption, 0, +
  5090.                 $(!REG_VT_SZ), "NDISWAN"}
  5091.         CloseRegKey $(KeyRules)
  5092.     else
  5093.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan NetRules key"
  5094.     endif
  5095.     OpenRegKey $(!REG_H_LOCAL) "" $(NdisWanSvcName) $(!MAXIMUM_ALLOWED) KeyService
  5096.     ifstr $(KeyService) != $(KeyNull)
  5097.         SetRegValue $(KeyService) {DisplayName, 0, +
  5098.                 $(!REG_VT_SZ),$(!ProductNDISWANDisplayName)}
  5099.         SetRegValue $(KeyService) {ImagePath, 0, +
  5100.                 $(!REG_VT_EXPAND_SZ),$(!ProductNDISWANImagePath)}
  5101.         SetRegValue $(KeyService) {Start, 0, $(!REG_VT_DWORD),2}
  5102.         SetRegValue $(KeyService) {Group, 0, $(!REG_VT_SZ), "NDISWAN"}
  5103.         DeleteRegValue $(KeyService) "DependOnService"
  5104.         DeleteRegValue $(KeyService) "DependOnGroup"
  5105.         OpenRegKey $(KeyService) "" "Linkage" $(!MAXIMUM_ALLOWED) KeyLinkage
  5106.         ifstr $(KeyLinkage) != $(KeyNull)
  5107.             DeleteRegValue $(KeyLinkage) "OtherDependencies"
  5108.             CloseRegKey $(KeyLinkage)
  5109.         endif
  5110.         CloseRegKey $(KeyService)
  5111.     else
  5112.         Debug-Output "UpdateNdisWanInfo: could not open NdisWan services key"
  5113.     endif
  5114.     OpenRegKey $(!REG_H_LOCAL) "" $(RasManLinkageName) $(!MAXIMUM_ALLOWED) KeyLinkage
  5115.     ifstr $(KeyLinkage) != $(KeyNull)
  5116.         SetRegValue $(KeyLinkage) {OtherDependencies, 0, +
  5117.                                    $(!REG_VT_MULTI_SZ), {""}}
  5118.         CloseRegKey $(KeyLinkage)
  5119.     else
  5120.         Debug-Output "UpdateNdisWanInfo: could not open RasMan\Linkage key"
  5121.     endif
  5122.     set Status   = STATUS_SUCCESSFUL
  5123. UpdateNdisWanInfoEnd =+
  5124.     Debug-Output "UpdateNdisWanInfo: Exit"
  5125.     return $(Status)
  5126. [UpdateAsyncMacNetRules]
  5127.     Debug-Output "UpdateAsyncMacNetRules: entry"
  5128.     set Status   = STATUS_FAILED
  5129.     Set KeyNull  = ""
  5130.     set AsyncMacRulesName = $(!NTN_SoftwareBase)"\Microsoft\AsyncMac\CurrentVersion\NetRules"
  5131.     OpenRegKey $(!REG_H_LOCAL) "" $(AsyncMacRulesName) $(!MAXIMUM_ALLOWED) KeyRules
  5132.     ifstr $(KeyRules) != $(KeyNull)
  5133.         set Status   = STATUS_SUCCESSFUL
  5134.         SetRegValue $(KeyRules) {bindable, 0, +
  5135.                 $(!REG_VT_MULTI_SZ),$(!NetRuleRASASYMACBindable)}
  5136.         CloseRegKey $(KeyRules)
  5137.     else
  5138.         Debug-Output "UpdateAsyncMacNetRules: could not open NdisWan NetRules key"
  5139.     endif
  5140.     Debug-Output "UpdateAsyncMacNetRules: Exit"
  5141.     return $(Status)
  5142. [UpdateAsyncMacParameters]
  5143.     Debug-Output "UpdateAsyncMacParameters: entry"
  5144.     set Status   = STATUS_SUCCESSFUL
  5145.     Set KeyNull  = ""
  5146.     set RasAsyMacParamKeyName = $(!NTN_ServiceBase)"\AsyncMac\Parameters"
  5147.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacParamKeyName) $(!MAXIMUM_ALLOWED) KeyMacParams
  5148.     ifstr $(KeyMacParams) != $(KeyNull)
  5149.         GetRegValue $(KeyMacParams), "DialinNBF" DialinNBFInfo
  5150.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5151.             GetRegValue $(KeyMacParams), "Dialin" DialinNBFInfo
  5152.             set PrevNumDialinNBF  = *($(DialinNBFInfo), 4)
  5153.             SetRegValue $(KeyMacParams) {DialinNBF, 0, +
  5154.                                         $(!REG_VT_DWORD),$(PrevNumDialinNBF)}
  5155.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5156.                 Debug-Output "UpdateAsyncMacParameters: deleting dialin key"
  5157.                 DeleteRegValue $(KeyMacParams) "Dialin"
  5158.             endif
  5159.         endif
  5160.         GetRegValue $(KeyMacParams), "DialoutNBF" DialoutNBFInfo
  5161.         Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5162.             GetRegValue $(KeyMacParams), "Dialout" DialoutNBFInfo
  5163.             set PrevNumDialoutNBF    = *($(DialoutNBFInfo), 4)
  5164.             SetRegValue $(KeyMacParams) {DialoutNBF, 0, +
  5165.                                         $(!REG_VT_DWORD),$(PrevNumDialoutNBF)}
  5166.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5167.                 Debug-Output "UpdateAsyncMacParameters: deleting dialout key"
  5168.                 DeleteRegValue $(KeyMacParams) "Dialout"
  5169.             endif
  5170.         endif
  5171.         CloseRegKey $(KeyMacParams)
  5172.     else
  5173.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac Params key"
  5174.     endif
  5175.     Debug-Output "UpdateAsyncMacParameters: Exit"
  5176.     return $(Status)
  5177. [UpdateAsyncMacStartType]
  5178.     Debug-Output "UpdateAsyncMacStartType: entry"
  5179.     set Status   = STATUS_SUCCESSFUL
  5180.     Set KeyNull  = ""
  5181.     set RasAsyMacKeyName = $(!NTN_ServiceBase)"\AsyncMac"
  5182.     OpenRegKey $(!REG_H_LOCAL) "" $(RasAsyMacKeyName) $(!MAXIMUM_ALLOWED) KeyMac
  5183.     ifstr $(KeyMac) != $(KeyNull)
  5184.         GetRegValue $(KeyMac), "Start" StartValue
  5185.         Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  5186.             set Start = *($(StartValue), 4)
  5187.             ifint $(Start) == 3
  5188.                 set Start = 2
  5189.                 SetRegValue $(KeyMac) {Start, 0, $(!REG_VT_DWORD), $(Start)}
  5190.             endif
  5191.         endif
  5192.         CloseRegKey $(KeyMac)
  5193.     else
  5194.         Debug-Output "OEMNSVRA.INF: could not open AsyncMac key"
  5195.     endif
  5196.     Debug-Output "UpdateAsyncMacStartType: Exit"
  5197.     return $(Status)
  5198. [UpdatePerfmonInfo]
  5199.     Debug-Output "UpdatePerfmonInfo: entry"
  5200.     set Status   = STATUS_FAILED
  5201.     Set KeyNull  = ""
  5202.     set RemoteAccessService = $(!NTN_ServiceBase)"\RemoteAccess"
  5203.     OpenRegKey $(!REG_H_LOCAL) "" $(RemoteAccessService) $(!MAXIMUM_ALLOWED) KeyService
  5204.     ifstr $(KeyService) != $(KeyNull)
  5205.         Shell "" UpdatePerfmonInfoHelper $(KeyService)
  5206.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5207.             Debug-Output "error shelling UpdatePerfmonInfoHelper."
  5208.             goto UpdatePerfmonInfoEnd
  5209.         endif
  5210.         Ifstr(i) $($R0) != STATUS_SUCCESSFUL
  5211.             Debug-Output "error returned by UpdatePerfmonInfo."
  5212.             goto UpdatePerfmonInfoEnd
  5213.         endif
  5214.         CloseRegKey $(KeyService)
  5215.         set Status = STATUS_SUCCESSFUL
  5216.     else
  5217.         Debug-Output "UpdatePerfmonInfo: error opening RemoteAccess service key"
  5218.     endif
  5219. UpdatePerfmonInfoEnd =+
  5220.     Debug-Output "UpdatePerfmonInfo: Exit"
  5221.     return $(Status)
  5222. [UpdatePerfmonInfoHelper]
  5223.     Debug-Output "UpdatePerfmonInfoHelper: entry"
  5224.     set Status   = STATUS_FAILED
  5225.     Set KeyNull  = ""
  5226.     set ServiceKey = $($0)
  5227.     set KeyPerformance = $(KeyNull)
  5228.     OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5229.     ifstr $(KeyPerformance) == $(KeyNull)
  5230.         CreateRegKey $(ServiceKey) {$(!RasPerfKeyName),$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" KeyPerformance
  5231.         OpenRegKey $(ServiceKey) "" $(!RasPerfKeyName) $(!MAXIMUM_ALLOWED) KeyPerformance
  5232.         ifstr $(KeyPerformance) == $(KeyNull)
  5233.             Debug-Output "Error creating Performance key"
  5234.             goto UpdatePerfmonInfoHelperEnd
  5235.         endif
  5236.     endif
  5237.     set NewValueList = +
  5238.          {{Library ,$(NoTitle),$(!REG_VT_SZ),$(!RasPerfLibraryName)},+
  5239.          {Open, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfOpenFunction)},+
  5240.          {Close, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCloseFunction)},+
  5241.          {Collect, $(NoTitle),$(!REG_VT_SZ),$(!RasPerfCollectFunction)}}
  5242.     Shell  "Utility.Inf", AddValueList, $(KeyPerformance), $(NewValueList)
  5243.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  5244.          Debug-Output "UpdatePerfmonInfoHelper: error shelling AddValueList"
  5245.          goto UpdatePerfmonInfoHelperEnd
  5246.     endif
  5247.     set RegistryErrorIndex = $($R0)
  5248.     Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  5249.         Debug-Output "UpdatePerfmonInfoHelper: AddValueList bombed out"
  5250.         goto UpdatePerfmonInfoHelperEnd
  5251.     endif
  5252.     CloseRegKey $(KeyPerformance)
  5253.     set Status = STATUS_SUCCESSFUL
  5254. UpdatePerfmonInfoHelperEnd =+
  5255.     Debug-Output "UpdatePerfmonInfoHelper: Exit"
  5256.     return $(Status)
  5257. [RenameRasHubToNdisWan]
  5258.     Debug-Output "RenameRasHubToNdisWan: entry"
  5259.     set Status   = STATUS_FAILED
  5260.     Set KeyNull  = ""
  5261.     set Manufacturer  = "Microsoft"
  5262.     OpenRegKey $(!REG_H_LOCAL) "" $(!NetworkCardKeyName) $(!MAXIMUM_ALLOWED) KeyNetcards
  5263.     ifstr $(KeyNetcards) == $(KeyNull)
  5264.          Debug-Output "RenameRasHubToNdisWan: could not open Netcards key"
  5265.          goto RenameRasHubToNdisWanEnd
  5266.     endif
  5267.     EnumRegKey $(KeyNetcards) NetcardsList
  5268.     ForListDo $(NetcardsList)
  5269.        set KeyName = *($($),1)
  5270.        OpenRegKey $(KeyNetcards) "" $(KeyName) $(!MAXIMUM_ALLOWED) Card
  5271.        ifstr $(Card) == $(KeyNull)
  5272.            Debug-Output "RenameRasHubToNdisWan: could not open netcard key"
  5273.            CloseRegKey $(KeyNetcards)
  5274.            goto RenameRasHubToNdisWanEnd
  5275.        endif
  5276.        GetRegValue $(Card), "ProductName" ProductNameInfo
  5277.        set CardProductName = *($(ProductNameInfo), 4)
  5278.        ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINName)
  5279.            set ThisOption = DIALIN
  5280.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTName)
  5281.            set ThisOption = DIALOUT
  5282.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINIPName)
  5283.            set ThisOption = DIALINIP
  5284.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALOUTIPName)
  5285.            set ThisOption = DIALOUTIP
  5286.        else-ifstr(i) $(CardProductName) == $(!ProductRASHUBDIALINOUTIPXName)
  5287.            set ThisOption = DIALINOUTIPX
  5288.        else
  5289.            goto endloop
  5290.        endif
  5291.        SetRegValue $(Card) {ProductName, 0, +
  5292.                             $(!REG_VT_SZ),$(!ProductNDISWAN$(ThisOption)Name)}
  5293.        SetRegValue $(Card) {Description, 0, +
  5294.                             $(!REG_VT_SZ),$(!ProductNDISWANDescription)}
  5295.        SetRegValue $(Card) {ServiceName, 0, $(!REG_VT_SZ), +
  5296.                             $(!ProductNDISWANName)$(KeyName)}
  5297.        SetRegValue $(Card) {Title, 0, $(!REG_VT_SZ),+
  5298.                             "["$(KeyName)"] "$(!ProductNDISWANTitle)}
  5299.        OpenRegKey $(Card) "" "NetRules" $(!MAXIMUM_ALLOWED) NetRules
  5300.        ifstr $(NetRules) == $(KeyNull)
  5301.            CloseRegKey $(KeyNetCards)
  5302.            CloseRegKey $(Card)
  5303.            Debug-Output "RenameRasHubToNdisWan: could not open "$(KeyName)"\NetRules key"
  5304.            goto RenameRasHubToNdisWanEnd
  5305.        Endif
  5306.        SetRegValue $(NetRules) {InfOption, 0, +
  5307.                             $(!REG_VT_SZ), "NDISWAN"}
  5308.        SetRegValue $(NetRules) {block, 0, +
  5309.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Block)}
  5310.        SetRegValue $(NetRules) {class, 0, +
  5311.                             $(!REG_VT_MULTI_SZ),$(!NetRuleHardware$(ThisOption)Class)}
  5312.        SetRegValue $(NetRules) {type, 0, +
  5313.                             $(!REG_VT_SZ),$(!NetRuleHardware$(ThisOption)Type)}
  5314.        Set TempProdName = """"$(!ProductNDISWANName)$(KeyName)""""
  5315.        Set TempBindForm = $(TempProdName)$(!NetRuleHardwareNDISWANBindForm)
  5316.        SetRegValue $(NetRules) {bindform, 0, $(!REG_VT_SZ),$(TempBindForm)}
  5317.        CloseRegKey $(NetRules)
  5318. endloop=+
  5319.        CloseRegKey $(Card)
  5320.     EndForListDo
  5321.     CloseRegKey $(KeyNetcards)
  5322.     set Status = STATUS_SUCCESSFUL
  5323. RenameRasHubToNdisWanEnd =+
  5324.     Debug-Output "RenameRasHubToNdisWan: Exit"
  5325.     return $(Status)
  5326. [UpgradeIpxInfo]
  5327.     Debug-Output "UpgradeIpxInfo: entry"
  5328.     set PORTSDLGHANDLE = $($0)
  5329.     set RasProtocolsName = $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols"
  5330.     set SapAgentName     = $(!NTN_SoftwareBase)"\Microsoft\NWSAPAGENT"
  5331.     set NwlnkRipName     = $(!NTN_SoftwareBase)"\Microsoft\NWLNKRIP"
  5332.     set IpxRouterName    = $(!NTN_ServiceBase)"\IpxRouter"
  5333.     OpenRegKey $(!REG_H_LOCAL) "" +
  5334.                       $(RasProtocolsName) $(!MAXIMUM_ALLOWED) KeyProtocols
  5335.     ifstr $(KeyProtocols) != ""
  5336.         set fIpxAllowed = 0
  5337.         GetRegValue $(KeyProtocols) "fIpxAllowed" IpxList
  5338.         ifint $(RegLastError) == 0
  5339.             set fIpxAllowed = *($(IpxList), 4)
  5340.         endif
  5341.         ifint $(fIpxAllowed) != 0
  5342.             Debug-Output "UpgradeIpxInfo: RAS is configured for IPX dialin"
  5343.             set KeyRouter = ""
  5344.             OpenRegKey $(!REG_H_LOCAL) "" +
  5345.                       $(IpxRouterName) $(!MAXIMUM_ALLOWED) KeyRouter
  5346.             ifstr $(KeyRouter) !=  ""
  5347.                 CloseRegKey $(KeyRouter)
  5348.                 Debug-Output "Renaming IpxRouter to NwlnkRip..."
  5349.                 LibraryProcedure Result $(PORTSDLGHANDLE) RenameIpxRouterToNwlnkRip
  5350.                 Shell "" RemoveServiceDependency "RemoteAccess" "IpxRouter"
  5351.                 Shell "" AddServiceDependency "RemoteAccess" "NwlnkRip"
  5352.                 Debug-Output "Renaming IpxRouter to NwlnkRip done..."
  5353.             endif
  5354.             OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5355.                                           $(!MAXIMUM_ALLOWED) KeyService
  5356.             ifstr $(KeyService) != ""
  5357.                 OpenRegKey $(KeyService) "" "Parameters" +
  5358.                                         $(!MAXIMUM_ALLOWED) KeyParams
  5359.                 ifstr(i) $(KeyParams) != ""
  5360.                    GetRegValue $(KeyParams) "NetbiosRouting" NetbiosRouting
  5361.                    ifint $(RegLastError) != 0
  5362.                        SetRegValue $(KeyParams) {"NetbiosRouting" , 0, $(!REG_VT_DWORD), "2"}
  5363.                    endif
  5364.                 endif
  5365.                 OpenRegKey $(KeyService) "" "Parameters\UseRef" +
  5366.                                             $(!MAXIMUM_ALLOWED) KeyUseRef
  5367.                 ifstr(i) $(KeyUseRef) == ""
  5368.                     ifstr(i) $(KeyParams) != ""
  5369.                        CreateRegKey $(KeyParams) {"UseRef", 0, GenericClass} +
  5370.                                           "" $(!MAXIMUM_ALLOWED) "" KeyUseRef
  5371.                        CloseRegKey $(KeyParams)
  5372.                     endif
  5373.                 endif
  5374.                 ifstr(i) $(KeyUseRef) != ""
  5375.                     SetRegValue $(KeyUseRef) {"RAS" , 0, $(!REG_VT_SZ), "1"}
  5376.                     CloseRegKey $(KeyUseRef)
  5377.                 endif
  5378.                 CloseRegKey $(KeyService)
  5379.             endif
  5380.             OpenRegKey $(!REG_H_LOCAL) "" $(SapAgentName) +
  5381.                                           $(!MAXIMUM_ALLOWED) KeyService
  5382.             ifstr $(KeyService) == ""
  5383.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnSapKeyName) +
  5384.                                               $(!MAXIMUM_ALLOWED) KeySap
  5385.                 Ifstr(i) $(KeySap) != ""
  5386.                     Shell "utility.inf", RemoveService +
  5387.                                          $(!ProductRASISNSAPName) "YES"
  5388.                     Shell "" InstallIsnSapService
  5389.                 endif
  5390.                 CloseRegKey $(KeySap)
  5391.             else
  5392.                 CloseRegKey $(KeyService)
  5393.             endif
  5394.             OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipName) +
  5395.                                           $(!MAXIMUM_ALLOWED) KeyService
  5396.             ifstr $(KeyService) == ""
  5397.                 OpenRegKey $(!REG_H_LOCAL) "" $(!RasIsnRipKeyName) +
  5398.                                               $(!MAXIMUM_ALLOWED) KeyRip
  5399.                 Ifstr(i) $(KeyRip) != ""
  5400.                     Shell "" InstallNwlnkRipService
  5401.                 CloseRegKey $(KeyRip)
  5402.             else
  5403.                 CloseRegKey $(KeyService)
  5404.             endif
  5405.             OpenRegKey $(!REG_H_LOCAL) ""  +
  5406.                        $(!NTN_ServiceBase)"\NWLNKIPX\Parameters"  +
  5407.                        $(!MAXIMUM_ALLOWED) KeyIpxParameters
  5408.             ifstr $(KeyIpxParameters) != $(KeyNull)
  5409.                 GetRegValue $(KeyIpxParameters), "SingleNetworkActive"  +
  5410.                             SingleNetworkActive
  5411.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5412.                     SetRegValue $(KeyIpxParameters) +
  5413.                                 {SingleNetworkActive, 0, $(!REG_VT_DWORD), 1}
  5414.                 endif
  5415.                 GetRegValue $(KeyIpxParameters), "DisableDialoutSap"  +
  5416.                             DisableDialoutSap
  5417.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5418.                     SetRegValue $(KeyIpxParameters) +
  5419.                                 {DisableDialoutSap, 0, $(!REG_VT_DWORD), 1}
  5420.                 endif
  5421.                 GetRegValue $(KeyIpxParameters), "DisableDialinNetbios"  +
  5422.                             DisableDialinNetbios
  5423.                 ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  5424.                     SetRegValue $(KeyIpxParameters) +
  5425.                                 {DisableDialinNetbios, 0, $(!REG_VT_DWORD), 1}
  5426.                 endif
  5427.                 CloseRegKey $(KeyIpxParameters)
  5428.             Endif
  5429.             else
  5430.                 Debug-Output "OEMNSVRA.INF: error opening NWLNKIPX\Parameters key"
  5431.             endif
  5432.         endif
  5433.         CloseRegKey $(KeyProtocols)
  5434.     else
  5435.         Debug-Output "UpgradeIpxInfo: error opening RAS\Protocols key"
  5436.     endif
  5437.     Debug-Output "UpgradeIpxInfo: exit"
  5438.     return
  5439. [SaveTcpipInfo]
  5440.     Debug-Output "SaveTcpipInfo: entry"
  5441.     set Status   = STATUS_FAILED
  5442.     Set KeyNull  = ""
  5443.     set RasIpKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ip"
  5444.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5445.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpKeyName) $(!MAXIMUM_ALLOWED) RasIpKey
  5446.     ifstr $(RasIpKey) != $(KeyNull)
  5447.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) +
  5448.                                             $(!MAXIMUM_ALLOWED) KeySrvParams
  5449.         ifstr $(KeySrvParams) == $(KeyNull)
  5450.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5451.            CloseRegKey $(RasIpKey)
  5452.            return $(Status)
  5453.         endif
  5454.         CreateRegKey $(KeySrvParams) {"Ip",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpKey
  5455.         OpenRegKey $(KeySrvParams) "" "Ip" $(!MAXIMUM_ALLOWED) RemoteIpKey
  5456.         ifstr $(RemoteIpKey) != $(KeyNull)
  5457.            EnumRegValue $(RasIpKey) NewValueList
  5458.            Shell  "utility.inf", AddValueList, $(RemoteIpKey), $(NewValueList)
  5459.            CloseRegKey $(KeySrvParams)
  5460.            CloseRegKey $(RemoteIpKey)
  5461.         endif
  5462.         CloseRegKey $(RasIpKey)
  5463.     endif
  5464.     Debug-Output "SaveTcpipInfo: exit"
  5465.     set Status = STATUS_SUCCESSFUL
  5466.     return $(Status)
  5467. [SaveIpxInfo]
  5468.     Debug-Output "SaveIpxInfo: entry"
  5469.     set RouterInstalled = $($0)
  5470.     set Status   = STATUS_FAILED
  5471.     Set KeyNull  = ""
  5472.     set RasIpxKeyName =  $(!NTN_SoftwareBase)"\Microsoft\Ras\Protocols\Ipx"
  5473.     set RasSvrParamKeyName = $(!NTN_ServiceBase)"\RemoteAccess\Parameters"
  5474.     OpenRegKey $(!REG_H_LOCAL) "" $(RasIpxKeyName) $(!MAXIMUM_ALLOWED) RasIpxKey
  5475.     ifstr $(RasIpxKey) != $(KeyNull)
  5476.         OpenRegKey $(!REG_H_LOCAL) "" $(RasSvrParamKeyName) +
  5477.                                             $(!MAXIMUM_ALLOWED) KeySrvParams
  5478.         ifstr $(KeySrvParams) == $(KeyNull)
  5479.            Debug-Output "SaveTcpipInfo: could not open RasSvr Params key"
  5480.            CloseRegKey $(RasIpxKey)
  5481.            return $(Status) $(fRouterInstalled)
  5482.         endif
  5483.         CreateRegKey $(KeySrvParams) {"Ipx",$(NoTitle),GenericClass} "" $(!MAXIMUM_ALLOWED) "" RemoteIpxKey
  5484.         OpenRegKey $(KeySrvParams) "" "Ipx" $(!MAXIMUM_ALLOWED) RemoteIpxKey
  5485.         ifstr $(RemoteIpxKey) != $(KeyNull)
  5486.            EnumRegValue $(RasIpxKey) NewValueList
  5487.            Shell  "utility.inf", AddValueList, $(RemoteIpxKey), $(NewValueList)
  5488.            SetRegValue $(RemoteIpxKey) {RouterInstalled, 0,+
  5489.                                        $(!REG_VT_DWORD), $(RouterInstalled)}
  5490.            CloseRegKey $(KeySrvParams)
  5491.            CloseRegKey $(RemoteIpxKey)
  5492.         endif
  5493.         CloseRegKey $(RasIpxKey)
  5494.     endif
  5495.     Debug-Output "SaveIpxInfo: exit"
  5496.     set Status = STATUS_SUCCESSFUL
  5497.     return $(Status)
  5498. [AddServiceDependency]
  5499.     Debug-Output "AddServiceDependency: entry"
  5500.     set Status   = STATUS_FAILED
  5501.     Set KeyNull  = ""
  5502.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5503.     set DependentName = $($0)
  5504.     set DependOn = $($1)
  5505.     set ServiceKey = $(KeyNull)
  5506.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5507.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5508.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5509.         set ServiceValues = *($(ServicesList),4)
  5510.         debug-output "AddServiceDependency: Old OtherDependencies: "$(ServiceValues)
  5511.         ifstr(i) $(ServiceValues) == {}
  5512.             Set ServiceValues = {$(DependOn)}
  5513.         else-ifstr(i) $(ServiceValues) == ""
  5514.             Set ServiceValues = {$(DependOn)}
  5515.         else-ifcontains(i) $(DependOn) in $(ServiceValues)
  5516.             return STATUS_SUCCESSFUL
  5517.         else
  5518.             Set ServiceValues = >($(ServiceValues), $(DependOn))
  5519.         endif
  5520.         debug-output "AddServiceDependency: New OtherDependencies: "$(ServiceValues)
  5521.         SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5522.                                    $(!REG_VT_MULTI_SZ), $(ServiceValues)}
  5523.         CloseRegKey $(ServiceKey)
  5524.         set Status = STATUS_SUCCESSFUL
  5525.     else
  5526.         Debug-Output "AddServiceDependency: error opening service "$(DependentService)"\Linkage"
  5527.     endif
  5528.     set KeyService = $(KeyNull)
  5529.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5530.     ifstr $(KeyService) != $(KeyNull)
  5531.         set newDependList = {$(DependOn)}
  5532.         GetRegValue    $(KeyService) "DependOnService" ServiceList
  5533.         ifint $(RegLastError) == 0
  5534.             Debug-Output "AddServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5535.             ForListDo *($(ServiceList),4)
  5536.                 ifstr(i) $($) != $(DependOn)
  5537.                    set newDependList = >($(newDependList), $($))
  5538.                 endif
  5539.             EndForListDo
  5540.         endif
  5541.         GetRegValue    $(KeyService) "DependOnGroup" GrpList
  5542.         ifint $(RegLastError) == 0
  5543.             Debug-Output "AddServiceDependency: old DependOnGroup List "*($(GrpList), 4)
  5544.             ForListDo *($(GrpList),4)
  5545.                set grp = "+"$($)
  5546.                set newDependList = >($(newDependList), $(grp))
  5547.             EndForListDo
  5548.         endif
  5549.         Debug-Output "OEMNSVRA.INF: AddServiceDependency: new Dependency List "$(newDependList)
  5550.         LibraryProcedure Result, $(!LIBHANDLE), SetupChangeServiceConfig, $(DependentName) $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), "", "", $(newDependList), "", "", ""
  5551.         CloseRegKey $(KeyService)
  5552.     else
  5553.         Debug-Output "AddServiceDependency: failed to open service linkage key"$(DependentService)
  5554.     endif
  5555.     Debug-Output "AddServiceDependency: exit"
  5556.     return $(Status)
  5557. [RemoveServiceDependency]
  5558.     Debug-Output "RemoveServiceDependency: entry"
  5559.     set Status   = STATUS_FAILED
  5560.     Set KeyNull  = ""
  5561.     set DependentService = $(!NTN_ServiceBase)\$($0)
  5562.     set DependentName = $($0)
  5563.     set DependOn = $($1)
  5564.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService)"\Linkage" $(!MAXIMUM_ALLOWED) ServiceKey
  5565.     ifstr(i) $(ServiceKey) != $(KeyNull)
  5566.         GetRegValue $(ServiceKey) "OtherDependencies" ServicesList
  5567.         debug-output "RemoveServiceDependency: old OtherDependencies list:"$(ServicesList)
  5568.         set ServiceValues = *($(ServicesList),4)
  5569.         debug-output "ServiceValues: "$(ServiceValues)
  5570.         ifcontains(i) $(DependOn) in $(ServiceValues)
  5571.             set NewServiceValues = {}
  5572.             ForListDo $(ServiceValues)
  5573.                 ifstr(i) $($) != $(DependOn)
  5574.                     set NewServiceValues = >($(NewServiceValues), $($))
  5575.                 endif
  5576.             EndForListDo
  5577.             debug-output "RemoveServiceDependency: new OtherDependencies list: "$(NewServiceValues)
  5578.             SetRegValue $(ServiceKey) {OtherDependencies, 0,+
  5579.                              $(!REG_VT_MULTI_SZ), $(NewServiceValues)}
  5580.         else
  5581.         endif
  5582.         CloseRegKey $(ServiceKey)
  5583.         set Status = STATUS_SUCCESSFUL
  5584.     else
  5585.         Debug-Output "RemoveServiceDependency: error opening service "$(DependentService)"\Linkage"
  5586.     endif
  5587.     set KeyService = $(KeyNull)
  5588.     OpenRegKey $(!REG_H_LOCAL) "" $(DependentService) $(!MAXIMUM_ALLOWED) KeyService
  5589.     ifstr $(KeyService) != $(KeyNull)
  5590.         set newDependList = {}
  5591.         GetRegValue    $(KeyService) "DeleteFlag" DeleteFlagValue
  5592.         ifint $(RegLastError) != 0
  5593.             GetRegValue    $(KeyService) "DependOnService" ServiceList
  5594.             ifint $(RegLastError) == 0
  5595.                 Debug-Output "RemoveServiceDependency: old DependOnService List "*($(ServiceList), 4)
  5596.                 ifcontains(i) $(DependOn) in *($(ServiceList),4)
  5597.                     ForListDo *($(ServiceList),4)
  5598.                         ifstr(i) $($) != $(DependOn)
  5599.                            set newDependList = >($(newDependList), $($))
  5600.                         endif
  5601.                     EndForListDo
  5602.                     GetRegValue $(KeyService) "DependOnGroup" GrpList
  5603.                     ifint $(RegLastError) == 0
  5604.                         ForListDo *($(GrpList),4)
  5605.                            set grp = "+"$($)
  5606.                            set newDependList = >($(newDependList), $(grp))
  5607.                         EndForListDo
  5608.                     endif
  5609.                     Debug-Output "OEMNSVRA.INF:RemoveServiceDependency: new DependOnService List "$(newDependList)
  5610.                     LibraryProcedure Result, $(!LIBHANDLE), +
  5611.                        SetupChangeServiceConfig, $(DependentName)  +
  5612.                        $(!SERVICE_NO_CHANGE), $(!SERVICE_NO_CHANGE), +
  5613.                        $(!SERVICE_NO_CHANGE), "", "",  +
  5614.                        $(newDependList), "", "", ""
  5615.                 endif
  5616.             endif
  5617.         endif
  5618.         CloseRegKey $(KeyService)
  5619.     else
  5620.         Debug-Output "RemoveServiceDependency: failed to open service linkage key"$(DependentService)
  5621.     endif
  5622.     Debug-Output "RemoveServiceDependency: exit"
  5623.     return $(Status)
  5624. [QueryUserQuit]
  5625.     set Status     = STATUS_FAILED
  5626.     set UserAction = CANCEL
  5627.     set STF_MB_TEXT  = "The changes will not be saved. "+
  5628.                        "Are you sure you want to exit Setup."
  5629.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5630.     ui start "ExitWarning"
  5631.     ifstr(i) $(DLGEVENT) == "YES"
  5632.         set Status     = STATUS_SUCCESSFUL
  5633.         set UserAction = "OK"
  5634.     else-ifstr(i) $(DLGEVENT) == "NO"
  5635.         set Status     = STATUS_SUCCESSFUL
  5636.         set UserAction = "CANCEL"
  5637.     else
  5638.     endif
  5639. fin_QueryUserQuit = +
  5640.     Return $(Status) $(UserAction)
  5641. [QueryRasUpgrade]
  5642.     set Status     = STATUS_FAILED
  5643.     set UserAction = CANCEL
  5644.     read-syms RasUpgrade$(!STF_LANGUAGE)
  5645.     set Text = $($0)$(Ver)$($1)$(Text1)$(Ver)$($2)$(Text2)$(Text3)
  5646.     set STF_MB_TEXT  = $(Text)
  5647.     read-syms ExitWarningDlg$(!STF_LANGUAGE)
  5648.     ui start "RasUpgrade"
  5649.     ifstr(i) $(DLGEVENT) == "YES"
  5650.         set Status     = STATUS_SUCCESSFUL
  5651.         set UserAction = "OK"
  5652.     else-ifstr(i) $(DLGEVENT) == "NO"
  5653.         set Status     = STATUS_SUCCESSFUL
  5654.         set UserAction = "CANCEL"
  5655.     else
  5656.     endif
  5657. fin_QueryRasUpgrade = +
  5658.     Return $(Status) $(UserAction)
  5659. [CP-List]
  5660. NBFCP       = "%SystemRoot%\SYSTEM32\RASNBFCP.DLL"
  5661. IPCP        = "%SystemRoot%\SYSTEM32\RASIPCP.DLL"
  5662. IPXCP       = "%SystemRoot%\SYSTEM32\RASIPXCP.DLL"
  5663. PAP         = "%SystemRoot%\SYSTEM32\RASPAP.DLL"
  5664. CHAP        = "%SystemRoot%\SYSTEM32\RASCHAP.DLL"
  5665. SPAP        = "%SystemRoot%\SYSTEM32\RASSPAP.DLL"
  5666. CBCP        = "%SystemRoot%\SYSTEM32\RASCBCP.DLL"
  5667. COMPCP      = "%SystemRoot%\SYSTEM32\RASCCP.DLL"
  5668. [Files-RemoveList]
  5669. RASADMINDLL    = $(!STF_WINDOWSSYSPATH)\RASADMIN.DLL
  5670. RASGTWYDLL     = $(!STF_WINDOWSSYSPATH)\RASGTWY.DLL
  5671. RASGPRXYDLL    = $(!STF_WINDOWSSYSPATH)\RASGPRXY.DLL
  5672. RASSRVEXE      = $(!STF_WINDOWSSYSPATH)\RASSRV.EXE
  5673. RASCTRSDLL     = $(!STF_WINDOWSSYSPATH)\RASCTRS.DLL
  5674. RASCTRSINI     = $(!STF_WINDOWSSYSPATH)\RASCTRS.INI
  5675. RASCTRNMH      = $(!STF_WINDOWSSYSPATH)\RASCTRNM.H
  5676. RASSPRXYEXE    = $(!STF_WINDOWSSYSPATH)\RASSPRXY.EXE
  5677. RASSAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASSAUTH.DLL
  5678. RASDIALEXE     = $(!STF_WINDOWSSYSPATH)\RASDIAL.EXE
  5679. RASPHONEHLP    = $(!STF_WINDOWSSYSPATH)\RASPHONE.HLP
  5680. RASGLOSSHLP    = $(!STF_WINDOWSSYSPATH)\RASGLOSS.HLP
  5681. RASAPI32DLL    = $(!STF_WINDOWSSYSPATH)\RASAPI32.DLL
  5682. RASCAUTHDLL    = $(!STF_WINDOWSSYSPATH)\RASCAUTH.DLL
  5683. RASADMINHLP    = $(!STF_WINDOWSSYSPATH)\RASADMIN.HLP
  5684. RASMANDLL      = $(!STF_WINDOWSSYSPATH)\RASMAN.DLL
  5685. RASMANEXE      = $(!STF_WINDOWSSYSPATH)\RASMAN.EXE
  5686. RASMSGDLL      = $(!STF_WINDOWSSYSPATH)\RASMSG.DLL
  5687. RASMXSDLL      = $(!STF_WINDOWSSYSPATH)\RASMXS.DLL
  5688. RASSERDLL      = $(!STF_WINDOWSSYSPATH)\RASSER.DLL
  5689. RASIPXCPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPXCP.DLL
  5690. RASPPPDLL      = $(!STF_WINDOWSSYSPATH)\RASPPP.DLL
  5691. RASPPPENDLL    = $(!STF_WINDOWSSYSPATH)\RASPPPEN.DLL
  5692. RASPAPDLL      = $(!STF_WINDOWSSYSPATH)\RASPAP.DLL
  5693. RASCHAPDLL     = $(!STF_WINDOWSSYSPATH)\RASCHAP.DLL
  5694. RASSPAPDLL     = $(!STF_WINDOWSSYSPATH)\RASSPAP.DLL
  5695. RASIPCPDLL     = $(!STF_WINDOWSSYSPATH)\RASIPCP.DLL
  5696. RASIPHLPDLL    = $(!STF_WINDOWSSYSPATH)\RASIPHLP.DLL
  5697. RASNBFCPDLL    = $(!STF_WINDOWSSYSPATH)\RASNBFCP.DLL
  5698. RASNBIPCDLL    = $(!STF_WINDOWSSYSPATH)\RASNBIPC.DLL
  5699. RASCCPDLL      = $(!STF_WINDOWSSYSPATH)\RASCCP.DLL
  5700. RASCBCPDLL     = $(!STF_WINDOWSSYSPATH)\RASCBCP.DLL
  5701. ASYNCMACSYS    = $(!STF_WINDOWSSYSPATH)\DRIVERS\ASYNCMAC.SYS
  5702. NDISWANSYS       = $(!STF_WINDOWSSYSPATH)\DRIVERS\NDISWAN.SYS
  5703. RASARPSYS      = $(!STF_WINDOWSSYSPATH)\DRIVERS\RASARP.SYS
  5704. [Source Media Descriptions]
  5705.     1 = "Windows NT Server CD-ROM", TAGFILE = cdrom.s
  5706. [Signature]
  5707.     FileType = MICROSOFT_FILE
  5708. [GetSignature]
  5709.     read-syms Signature
  5710.     return $(FileType)
  5711. [ProductType]
  5712. STF_PRODUCT  = LanmanNT
  5713. STF_PLATFORM = I386
  5714. [Files-Ras-Admin]
  5715. 1,RASADMIN.EXE , SIZE=999 , NODELETESOURCE
  5716. 1,RASADMIN.CNT , SIZE=999
  5717. 1,RASADMIN.HLP , SIZE=999
  5718. [Files-Ras-Client]
  5719. 1,RASPHONE.EXE , SIZE=999 , NODELETESOURCE
  5720. 1,RASAPI16.DLL , SIZE=999
  5721. 1,RASAPI32.DLL , SIZE=999
  5722. 1,RASCAUTH.DLL , SIZE=999
  5723. 1,RASDIAL.EXE , SIZE=999
  5724. 1,RASGLOSS.CNT , SIZE=999
  5725. 1,RASGLOSS.HLP , SIZE=999
  5726. 1,RASMON.EXE , SIZE=999
  5727. 1,RASPHONE.CNT , SIZE=999
  5728. 1,RASPHONE.HLP , SIZE=999
  5729. [Files-Ras-Common]
  5730. 1,TAPISRV.DLL , SIZE=999 , NODELETESOURCE
  5731. 1,RASCBCP.DLL , SIZE=999
  5732. 1,RASCCP.DLL , SIZE=999
  5733. 1,RASCHAP.DLL , SIZE=999
  5734. 1,RASIPCP.DLL , SIZE=999
  5735. 1,RASIPHLP.DLL , SIZE=999
  5736. 1,RASIPXCP.DLL , SIZE=999
  5737. 1,RASMAN.DLL , SIZE=999
  5738. 1,RASMAN.EXE , SIZE=999
  5739. 1,RASMSG.DLL , SIZE=999
  5740. 1,RASMXS.DLL , SIZE=999
  5741. 1,RASNBFCP.DLL , SIZE=999
  5742. 1,RASNBIPC.DLL , SIZE=999
  5743. 1,RASPAP.DLL , SIZE=999
  5744. 1,RASPPP.DLL , SIZE=999
  5745. 1,RASPPPEN.DLL , SIZE=999
  5746. 1,RASSER.DLL , SIZE=999
  5747. 1,RASSPAP.DLL , SIZE=999
  5748. 1,RASTAPI.DLL , SIZE=999
  5749. [Files-Ras-Drivers]
  5750. 1,ASYNCMAC.SYS , SIZE=999
  5751. 1,NDISTAPI.SYS , SIZE=999
  5752. 1,NDISWAN.SYS , SIZE=999
  5753. 1,RASARP.SYS , SIZE=999
  5754. [Files-Ras-Inf]
  5755. modem = 1,MODEM.INF , SIZE=999 , NODELETESOURCE
  5756. pad = 1,PAD.INF , SIZE=999 , NODELETESOURCE
  5757. rasico = 1,RAS.ICO , SIZE=999 , NODELETESOURCE
  5758. rasread = 1,RASREAD.TXT , SIZE=999 , NODELETESOURCE
  5759. switch = 1,SWITCH.INF , SIZE=999 , NODELETESOURCE
  5760. [Files-Ras-Server]
  5761. 1,RASADMIN.DLL , SIZE=999
  5762. 1,RASCTRS.DLL , SIZE=999
  5763. 1,RASGPRXY.DLL , SIZE=999
  5764. 1,RASGTWY.DLL , SIZE=999
  5765. 1,RASSAUTH.DLL , SIZE=999
  5766. 1,RASSPRXY.EXE , SIZE=999
  5767. 1,RASSRV.EXE , SIZE=999
  5768. [Files-Resource]
  5769. 1,RASCFG.DLL , SIZE=999 , NODELETESOURCE
  5770. 1,RASFIL32.DLL , SIZE=999 , NODELETESOURCE
  5771. 1,RASRES.DLL , SIZE=999 , NODELETESOURCE
  5772. 1,RASSETUP.CNT , SIZE=999 , NODELETESOURCE
  5773. 1,RASSETUP.HLP , SIZE=999 , NODELETESOURCE
  5774. [LanguagesSupported]
  5775.     ENG
  5776. [OptionsTextENG]
  5777.     RAS = "Remote Access Service"
  5778. [FileConstantsENG]
  5779.     RasGroup    = "Remote Access Service"
  5780.     RasPhone    = "Remote Access"
  5781.     RasMon      = "Remote Access Monitor"
  5782.     RasAdmin    = "Remote Access Admin"
  5783.     ReadMe      = "Read Me"
  5784.     RasInternet = "Remote Access and the Internet"
  5785.     RasHelp     = "Remote Access Help"
  5786.     ProCaption   = "Remote Access Service Setup"
  5787.     ProCancel    = "Cance&l"
  5788.     ProCancelMsg = "Remote Access Service is not correctly installed. "+
  5789.                    "Are you sure you want to cancel copying files?"
  5790.     ProCancelCap = "Remote Access Service Setup Message"
  5791.     ProText1     = "Copying:"
  5792.     ProText2     = "To:"
  5793.     Error        = "Unable to determine proper source disk location; copy cannot be performed."
  5794.     FunctionTitle   ="Remote Access Setup"
  5795.     ProductRASDescription       = "Remote Access Service"
  5796.     ProductRASSVRDescription    = "Windows NT Remote Access NetBios Gateway"
  5797.     ProductRASMANDescription    = "Windows NT Remote Access API Layer"
  5798.         !ProductNDISWANDescription       = "Windows NT Remote Access WAN Wrapper"
  5799.     ProductRASASYMACDescription = "Windows NT Remote Access AsyMac Adapter Driver"
  5800.     ProductRASTitle             = "Remote Access Service"
  5801.     ProductRASDisplayName       = "Remote Access Service"
  5802.     ProductRASSVRTitle          = "Remote Access Server Service"
  5803.     ProductRASSVRDisplayName    = "Remote Access Server"
  5804.     !ProductRASISNRIPTitle       = "Remote Access NWLNKRIP Service"
  5805.     !ProductRASISNRIPDisplayName = "Remote Access NWLNKRIP Service"
  5806.     !ProductRASISNSAPTitle       = "Remote Access NWLNKSAP Service"
  5807.     !ProductRASISNSAPDisplayName = "Remote Access NWLNKSAP Service"
  5808.     !ProductRASARPTitle          = "Remote Access ARP Service"
  5809.     !ProductRASARPDisplayName    = "Remote Access ARP Service"
  5810.     ProductRASMANTitle          = "Remote Access Connection Manager"
  5811.     ProductRASMANDisplayName    = "Remote Access Connection Manager"
  5812.         !ProductNDISWANTitle             = "Remote Access WAN Wrapper"
  5813.         !ProductNDISWANDisplayName       = "Remote Access WAN Wrapper"
  5814.     ProductRASASYMACTitle       = "Remote Access Mac"
  5815.     ProductRASASYMACDisplayName = "Remote Access Mac"
  5816.     !ProductNDISTAPIDisplayName = "Microsoft NDIS TAPI driver"
  5817. [DialogConstantsENG]
  5818.     Help        = "&Help"
  5819.     Exit        = "E&xit"
  5820.     OK          = "OK"
  5821.     HelpContext = ""
  5822.     Continue    = "C&ontinue"
  5823.     Cancel      = "C&ancel"
  5824. [ExitWarningDlgENG]
  5825.     DlgType      = "MessageBox"
  5826.     STF_MB_TITLE = "Remote Access Service Setup"
  5827.     STF_MB_TYPE  = 3
  5828.     STF_MB_ICON  = 5
  5829.     STF_MB_DEF   = 2
  5830. [SetupAbortDlgENG]
  5831.     DlgType     = "Info"
  5832.     DlgTemplate = "RESTART"
  5833.     Caption     = "Remote Access Service Setup"
  5834.     DlgText     = "Setup for Remote Access Service failed."$(LF)$(LF)+
  5835.                   "Please choose Exit to exit back to the Windows NT System."
  5836.     Windows     = "E&xit to &Windows NT"
  5837. [RasInstallOverDlgENG]
  5838.     DlgType      = "Info"
  5839.     DlgTemplate  = "RASINSTALLED_1"
  5840.     Caption      = "Remote Access Service Setup"
  5841.     Help         = "&Help"
  5842.     Exit         = "OK"
  5843.     HelpContext  = #( HelpContextIDs, HC_INSTALLOVER1, 1 )
  5844. [AbortMessageENG]
  5845.   AbortText  =  "Aborting Remote Access Setup. Please restart the system "+
  5846.                 "to fix the problem."
  5847. [ShellCodeErrorMsgENG]
  5848.     DlgType      = "MessageBox"
  5849.     STF_MB_TITLE = "Error: "$(FunctionTitle)
  5850.     STF_MB_TEXT  = "An error occured running the shell command. Please "+
  5851.                    "restart the system to fix the problem."
  5852.     STF_MB_TYPE  = 1
  5853.     STF_MB_ICON  = 3
  5854.     STF_MB_DEF   = 1
  5855. [SuccessfulInstallENG]
  5856.   Success  = "Remote Access Service has been installed."
  5857.   AdminMsg = "Please use the Remote Access Admin program to assign Remote "+
  5858.              "Access permissions to users. "+
  5859.              "Start Remote Access Admin from the Program Manager by "+
  5860.              "double-clicking the Remote Access Admin icon in the "+
  5861.              "Remote Access Service program group."
  5862. [MsgDlgENG]
  5863.     DlgType      = "MessageBox"
  5864.     STF_MB_TYPE  = 1
  5865.     STF_MB_ICON  = 2
  5866.     STF_MB_DEF   = 2
  5867. [ConfirmOverwriteDlgENG]
  5868. DlgType = "MessageBox"
  5869. STF_MB_TITLE = "Remote Access Service Installation"
  5870. STF_MB_TYPE  = 3
  5871. STF_MB_ICON  = 4
  5872. STF_MB_DEF   = 1
  5873. STF_MB_TEXT = "Setup detected an older modem.inf, switch.inf or pad.inf "+
  5874.         "file in the system32\ras directory. Should setup update these "+
  5875.         "files? (The existing files will be saved with the extension BAK). "+
  5876.         "If you choose NO the newer files will be copied to system32\ras "+
  5877.         "with the file extension NEW."
  5878. [StatusUpdatingRegistryENG]
  5879.     CreatingRas             = "Please wait while Remote Access is installed..."
  5880.     WritingRasParams        = "Writing Remote Access parameters..."
  5881.     WritingRasParamsAdd     = "Writing Remote Access parameters...Adding RAS binding "
  5882.     WritingRasParamsRemove  = "Writing Remote Access parameters...Removing RAS binding "
  5883.     RemovingRas             = "Removing Remote Access Service..."
  5884.     RemovingAdapters        = "Remote Access Setup: Removing RAS binding "
  5885.     RemovingResources       = "Removing Remote Access resource files..."
  5886.     UpdatingRas             = "Please wait while Remote Access is updated..."
  5887. [StatusDeterminingConfigENG]
  5888.     ReadingConfig      = "Determining current configuration ..."
  5889. [StatusCopyingResENG]
  5890.     Status = "Copying DLLs and INF files to disk ..."
  5891. [NonFatalError1ENG]
  5892.     NonFatal  = "Setup cannot function properly without a user name."
  5893. [FatalErrorMemENG]
  5894.     Fatal  = "Not enough memory is available. Remote Access requires atleast 2 Meg."
  5895. [NoConfigAdminENG]
  5896.     NoConfigAdmin = "The only component installed currently is RasAdmin which "+
  5897.                     "cannot be configured."
  5898. [VerExistsENG]
  5899.     Ver   = " version "
  5900.     Text1 = " is already installed. Please use"+
  5901.             " [Update] option from the Network Control Panel"+
  5902.             " aplet to Update Remote Access."
  5903. [NetworkConfigErrorENG]
  5904.     Text1 = "Setup encountered an error while determining the "+
  5905.             "network configuration.  Please make sure that "+
  5906.             "the network is properly configured before attempting "+
  5907.             "to install Remote Access Service."
  5908.     Text2 = "The Microsoft Windows Workstation and Server Service must be "+
  5909.             "installed for proper operation of Remote Access Service."$(!LF)$(!LF)+
  5910.             "To install Workstation or Server Service:"$(!LF)$(!LF)+
  5911.             "1. Invoke 'Network' control panel applet."$(!LF)+
  5912.             "2. Choose Add Software and select Workstation or Server from the list."
  5913. [NoPortsConfiguredENG]
  5914.    NoPortsError =+
  5915.        "Remote Access is not configured with any ports. "+
  5916.        "Remote Access will now be removed.  "+
  5917.        "You can add Remote Access Service and configure it to add "+
  5918.        "ports using the Network option in Control Panel "+
  5919.        "after restarting the system."
  5920. [QueryInstalledProtocolsErrorENG]
  5921.     Text  = "Setup encountered an error while determining the "+
  5922.             "installed network protocols.  Try restarting the "+
  5923.             "system to correct the problem. Contact your system "+
  5924.             "administrator, if the problem persists."
  5925. [RasUpgradeENG]
  5926.     Ver = " ver "
  5927.     Text1 = " exists on the system. Are you sure you want to upgrade to"
  5928.     Text2 = "?. "
  5929.     Text3 = "Selecting YES will result in the new version replacing the old."
  5930. [InstallLoopbackENG]
  5931. Message = "RAS Setup has discovered that you have configured one or more "+
  5932.           "ports to receive calls and your computer does not have a "+
  5933.           "network adapter installed. You must install the MS Loopback "+
  5934.           "Adapter using the Network option in Control Panel for remote "+
  5935.           "clients to use resources on this computer."
  5936. [NoNetbeuiDlgENG]
  5937.     NoNetbeuiWarning =+
  5938.         "The NetBEUI protocol is either not installed or not configured "+
  5939.         "for Remote Access.  NetBEUI provides the fastest throughput to "+
  5940.         "NetBIOS resources when accessed over a Remote Access connection. "+
  5941.         "If clients will access remote NetBIOS resources, configure RAS "+
  5942.         "to use NetBEUI. "$(!LF)$(!LF)+
  5943.         "You can add the NetBEUI protocol to your computer using the "+
  5944.         "Network option in Control Panel."
  5945. [NoProtocolsDlgENG]
  5946.     NoProtocolsWarning =+
  5947.        "Remote Access is not configured with any network protocols. "+
  5948.        "Remote Access will now be removed.  "+
  5949.        "You can add Remote Access Service and configure it to support "+
  5950.        "network protocols using the Network option in Control Panel "+
  5951.        "after restarting the system."
  5952. [UpgradeErrorsENG]
  5953. UpgradeIsdnInfoError = "Remote Access Setup encoutered an error while "+
  5954.                        "updating the ISDN information. Please remove and "+
  5955.                        "reinstall Remote Access to ensure proper operation."
  5956. [Billboard1ENG]
  5957. Status = "Remote Access Setup is installing the NetBEUI transport..."
  5958. [Billboard2ENG]
  5959. Status = "Remote Access Setup is installing the TCP/IP transport..."
  5960. [Billboard3ENG]
  5961. Status = "Remote Access Setup is installing NWLINK and related services..."
  5962.